Sha256: a8bd7da72fc4aa0759c2154f6037670b9643f3c5a3fcbf1ce3533b9bb531753d
Contents?: true
Size: 637 Bytes
Versions: 33
Compression:
Stored size: 637 Bytes
Contents
When /^the current context is a blog post$/ do @locals ||= {} @locals[:this] = BlogPost.new end When /^the current context is a special blog post$/ do @locals ||= {} @locals[:this] = SpecialBlogPost.new end When /^the current context is an array$/ do @locals ||= {} @locals[:this] = %w(foo bar baz blam mumble) end When /^the current context is a list of discussions$/ do @locals ||= {} discussions = [] (1..3).each do |i| posts = (1..i).to_a.map { |x| Post.new(:title => "Post #{x+3*i}") } discussions << Discussion.new(:name => "Discussion #{i}", :posts => posts) end @locals[:this] = discussions end
Version data entries
33 entries across 33 versions & 1 rubygems