Transpec specs

This commit is contained in:
Luis Ramos
2020-08-06 12:52:30 +01:00
parent d6862cdbce
commit ce2f0a5b9e
2 changed files with 3 additions and 3 deletions

View File

@@ -22,9 +22,9 @@ describe Spree::Preferences::Preferable do
before :each do
@a = A.new
@a.stub(persisted?: true)
allow(@a).to receive_messages(persisted?: true)
@b = B.new
@b.stub(persisted?: true)
allow(@b).to receive_messages(persisted?: true)
# ensure we're persisting as that is the default
#

View File

@@ -37,7 +37,7 @@ describe Spree::Preferences::Store do
it "should return and cache fallback value when persistence is disabled (i.e. on bootstrap)" do
Rails.cache.clear
@store.stub(should_persist?: false)
allow(@store).to receive_messages(should_persist?: false)
expect(@store.get(:test, true)).to be_truthy
expect(Rails.cache.read(:test)).to be_truthy
end