Sha256: 7a9306e178c0b4b448b5ba614c36520d5a05d9d85a14785c82d5a6ffeb6f79b7

Contents?: true

Size: 741 Bytes

Versions: 14

Compression:

Stored size: 741 Bytes

Contents

require 'spec_helper'

feature 'decorating controller ivar' do
  background do
    @matz = Author.create! :name => 'matz'
    Author.create! :name => 'takahashim'
  end
  after do
    Author.delete_all
  end

  scenario 'decorating a model object in ivar' do
    visit "/authors/#{@matz.id}"
    page.should have_content 'matz'
    page.should have_content 'matz'.capitalize
  end

  scenario 'decorating model scope in ivar' do
    visit '/authors'
    page.should have_content 'takahashim'
    page.should have_content 'takahashim'.reverse
  end

  scenario "decorating models' array in ivar" do
    visit '/authors?variable_type=array'
    page.should have_content 'takahashim'
    page.should have_content 'takahashim'.reverse
  end
end

Version data entries

14 entries across 13 versions & 2 rubygems

Version Path
active_decorator-0.3.4 spec/features/controller_ivar_spec.rb
r_decorator-0.0.7 spec/dummy/spec/features/controller_ivar_spec.rb
r_decorator-0.0.6 spec/features/controller_ivar_spec.rb
r_decorator-0.0.6 spec/dummy/spec/requests/controller_ivar_spec.rb
r_decorator-0.0.5 spec/features/controller_ivar_spec.rb
r_decorator-0.0.2 spec/features/controller_ivar_spec.rb
r_decorator-0.0.1 spec/features/controller_ivar_spec.rb
active_decorator-0.3.3 spec/requests/controller_ivar_spec.rb
active_decorator-0.3.2 spec/requests/controller_ivar_spec.rb
active_decorator-0.3.1 spec/requests/controller_ivar_spec.rb
active_decorator-0.3.0 spec/requests/controller_ivar_spec.rb
active_decorator-0.2.1 spec/requests/controller_ivar_spec.rb
active_decorator-0.2.0 spec/requests/controller_ivar_spec.rb
active_decorator-0.1.0 spec/requests/controller_ivar_spec.rb