Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 80e53009f1
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.694 kB
require 'spec_helper'
describe "method_missing" do
shared_examples_for "a well-behaved method_missing hook" do
it "allows undefined methods to raise errors as normal" do
expect { some_undefined_method }.to raise_error(NameError)
end
end
it_behaves_like "a well-behaved method_missing hook"
context "when RSpec::Matchers has been included in an example group" do
include RSpec::Matchers
it_behaves_like "a well-behaved method_missing hook"
end
context "when a module that includes RSpec::Matchers has been included in an example group" do
include Module.new { include RSpec::Matchers }
it_behaves_like "a well-behaved method_missing hook"
end
end
Jump to Line
Something went wrong with that request. Please try again.