spec/helper.rb in flipper-0.9.2 vs spec/helper.rb in flipper-0.10.0

- old
+ new

@@ -17,10 +17,12 @@ RSpec.configure do |config| config.before(:example) do Flipper.unregister_groups end + config.disable_monkey_patching! + config.filter_run focus: true config.run_all_when_everything_filtered = true end RSpec.shared_examples_for 'a percentage' do @@ -50,11 +52,11 @@ described_class.new(-1) }.to raise_error(ArgumentError, "value must be a positive number less than or equal to 100, but was -1") end end -shared_examples_for 'a DSL feature' do +RSpec.shared_examples_for 'a DSL feature' do it "returns instance of feature" do expect(feature).to be_instance_of(Flipper::Feature) end it "sets name" do @@ -78,10 +80,10 @@ dsl.send(method_name, Object.new) }.to raise_error(ArgumentError, /must be a String or Symbol/) end end -shared_examples_for "a DSL boolean method" do +RSpec.shared_examples_for "a DSL boolean method" do it "returns boolean with value set" do result = subject.send(method_name, true) expect(result).to be_instance_of(Flipper::Types::Boolean) expect(result.value).to be(true)