Sha256: 2e643b1d7eff5f9bc2d79136489f7a9c9043909d622de97842330c60edb08483

Contents?: true

Size: 810 Bytes

Versions: 21

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'

feature 'decorating partial object' do
  background do
    Author.create! :name => 'aamine'
    nari = Author.create! :name => 'nari'
    nari.books.create! :title => 'the gc book'
  end
  after do
    Book.delete_all
    Author.delete_all
  end

  scenario 'decorating implicit @object' do
    visit '/authors'
    page.should have_content 'the gc book'
    page.should have_content 'the gc book'.reverse
  end

  scenario 'decorating implicit @collection' do
    visit '/authors?partial=collection'
    page.should have_content 'the gc book'
    page.should have_content 'the gc book'.reverse
  end

  scenario 'decorating objects in @locals' do
    visit '/authors?partial=locals'
    page.should have_content 'the gc book'
    page.should have_content 'the gc book'.upcase
  end
end

Version data entries

21 entries across 20 versions & 2 rubygems

Version Path
active_decorator-0.5.3 spec/features/partial_spec.rb
active_decorator-0.5.2 spec/features/partial_spec.rb
active_decorator-0.5.1 spec/features/partial_spec.rb
active_decorator-0.5.0 spec/features/partial_spec.rb
active_decorator-0.4.0 spec/features/partial_spec.rb
active_decorator-0.3.4 spec/features/partial_spec.rb
r_decorator-0.0.7 spec/dummy/spec/features/partial_spec.rb
r_decorator-0.0.6 spec/dummy/spec/requests/partial_spec.rb
r_decorator-0.0.6 spec/features/partial_spec.rb
r_decorator-0.0.5 spec/features/partial_spec.rb
r_decorator-0.0.4 spec/features/partial_spec.rb
r_decorator-0.0.3 spec/features/partial_spec.rb
r_decorator-0.0.2 spec/features/partial_spec.rb
r_decorator-0.0.1 spec/features/partial_spec.rb
active_decorator-0.3.3 spec/requests/partial_spec.rb
active_decorator-0.3.2 spec/requests/partial_spec.rb
active_decorator-0.3.1 spec/requests/partial_spec.rb
active_decorator-0.3.0 spec/requests/partial_spec.rb
active_decorator-0.2.1 spec/requests/partial_spec.rb
active_decorator-0.2.0 spec/requests/partial_spec.rb