-
-
Save astjohn/2046287 to your computer and use it in GitHub Desktop.
Let not working in scope of nested describe
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
require 'helper' | |
describe ZenGenerator do | |
let (:good_attributes) do | |
Hash.new(start: 20, finish: 30, prefix: "V", suffix: "X", prefix_zeroes: true) | |
end | |
describe "Initialization:" do | |
describe "#initialize" do | |
good_attributes.each do |attr, val| | |
it "sets the instance variable for #{attr}" do | |
ZenGenerator.new(var: val).send("#{attr}").must_equal val | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment