Skip to content

Instantly share code, notes, and snippets.

@astjohn
Created March 15, 2012 19:29
Show Gist options
  • Save astjohn/2046287 to your computer and use it in GitHub Desktop.
Save astjohn/2046287 to your computer and use it in GitHub Desktop.
Let not working in scope of nested describe
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