Skip to content

Instantly share code, notes, and snippets.

@kwstannard
Created September 15, 2014 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwstannard/cac9baf6d63e57b2efb3 to your computer and use it in GitHub Desktop.
Save kwstannard/cac9baf6d63e57b2efb3 to your computer and use it in GitHub Desktop.
Module Testing without coupling
RSpec.describe YourModule do
let(:includer) { Class.new.include(described_class).new }
describe "#hello_world" do
it "returns Hello World" do
expect(includer.hello_world).
to eq("Hello World")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment