Skip to content

Commit

Permalink
Fix sporadically failing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Aug 11, 2014
1 parent 5827a8b commit 2a50f6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/unit/adamantium/module_methods/included_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

before do
# Prevent Module.included from being called through inheritance
Adamantium.stub(:included)
allow(Adamantium).to receive(:included)
end

around do |example|
Expand All @@ -30,7 +30,9 @@
# did not seem to work for this.
included = false
superclass.class_eval { define_method(:included) { |_| included = true } }
expect { subject }.to change { included }.from(false).to(true)
expect(included).to be(false)
subject
expect(included).to be(true)
end

it 'includes Adamantium into the descendant' do
Expand Down

0 comments on commit 2a50f6a

Please sign in to comment.