Skip to content

Commit

Permalink
Merge pull request flippercloud#189 from jnunemaker/disable-rspec-mon…
Browse files Browse the repository at this point in the history
…key-patching

disables RSpec monkey patching
  • Loading branch information
greatuserongithub authored Nov 7, 2016
2 parents 31a107c + e8520f2 commit 0a97100
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/flipper/middleware/memoizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
flipper.adapter.memoize = nil
end

shared_examples_for "flipper middleware" do
RSpec.shared_examples_for "flipper middleware" do
it "delegates" do
called = false
app = lambda { |env|
Expand Down
6 changes: 4 additions & 2 deletions spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
Flipper.unregister_groups
end

config.disable_monkey_patching!

config.filter_run focus: true
config.run_all_when_everything_filtered = true
end
Expand Down Expand Up @@ -52,7 +54,7 @@
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
Expand Down Expand Up @@ -80,7 +82,7 @@
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)
Expand Down

0 comments on commit 0a97100

Please sign in to comment.