Sha256: 9f12dce2e8a0712ca45bf6326bfe4843b3d3979815cef54ce25658b5b8bbf906
Contents?: true
Size: 728 Bytes
Versions: 17
Compression:
Stored size: 728 Bytes
Contents
require "spec_helper" describe Shamu::Features::Conditions::Matching do let( :context ) { double( Shamu::Features::Context ) } let( :toggle ) { double( Shamu::Features::Toggle ) } it "matches if another feature is enabled" do condition = scorpion.new Shamu::Features::Conditions::Matching, "spec/example", toggle expect( context ).to receive( :enabled? ).and_return true expect( condition.match?( context ) ).to be_truthy end it "doesn't matche if another feature is disabled" do condition = scorpion.new Shamu::Features::Conditions::Matching, "spec/example", toggle expect( context ).to receive( :enabled? ).and_return false expect( condition.match?( context ) ).to be_falsy end end
Version data entries
17 entries across 17 versions & 1 rubygems