Last active
October 26, 2016 23:14
-
-
Save apotonick/fed8d7136370877b057762877f060cd3 to your computer and use it in GitHub Desktop.
RSpec RSpec::Core::ExampleGroup::WrongScopeError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rspec | |
module Helpers | |
def factory(name, method_name, &block) | |
let(name) { block.call } | |
end | |
end | |
end | |
RSpec.configure do |c| | |
c.extend Trailblazer::Rspec::Helpers | |
end | |
let (:a) { Object } | |
factory(:bla) { a } | |
it { bla } # RSpec::Core::ExampleGroup::WrongScopeError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage example: