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

Version Path
dryml-2.2.6 features/step_definitions/contexts.rb
dryml-2.2.5 features/step_definitions/contexts.rb
dryml-2.2.4 features/step_definitions/contexts.rb
dryml-2.2.3 features/step_definitions/contexts.rb
dryml-2.2.2 features/step_definitions/contexts.rb
dryml-2.2.1 features/step_definitions/contexts.rb
dryml-2.2.0 features/step_definitions/contexts.rb
dryml-2.1.2 features/step_definitions/contexts.rb
dryml-2.1.1 features/step_definitions/contexts.rb
dryml-2.1.0 features/step_definitions/contexts.rb
dryml-2.1.0.pre4 features/step_definitions/contexts.rb
dryml-2.1.0.pre3 features/step_definitions/contexts.rb
dryml-2.1.0.pre2 features/step_definitions/contexts.rb
dryml-2.1.0.pre1 features/step_definitions/contexts.rb
dryml-2.0.1 features/step_definitions/contexts.rb
dryml-2.0.0 features/step_definitions/contexts.rb
dryml-2.0.0.pre10 features/step_definitions/contexts.rb
dryml-2.0.0.pre9 features/step_definitions/contexts.rb
dryml-2.0.0.pre8 features/step_definitions/contexts.rb
dryml-2.0.0.pre7 features/step_definitions/contexts.rb