Sha256: 603cf99f61730f23ab0e3ef604fdab2ba06f15293488956f2b2ae38201582596

Contents?: true

Size: 1005 Bytes

Versions: 16

Compression:

Stored size: 1005 Bytes

Contents

def make_request(id = page.id)
  get :show, id: id
end

Given 'a published page "$path" with a theme containing "$body"' do |path, body|
  @theme = create :theme, body: body
  @page = create :page, path: path, theme: @theme
  @page.publish! author: create(:author)
end

When 'I choose another theme containing "$body"' do |body|
  @new_theme = create :theme, body: body
  @page.theme = @new_theme
end

When 'I change the theme to contain "$body"' do |body|
  @page.theme.body = body
  @page.save
end

And  "I GET '/pubbed'" do
  make_request
end

Then 'I should see "$body"' do |body|
  @page.reload
  last_response.body.should include(@page.theme.body)
end

When "I publish the page with another theme" do
  @page.theme = @new_theme
  @page.save
  @page.publish! author: create(:author)
end

When /^I publish the page$/ do
  @page.publish! author: create(:author)
end

When 'I revert to the previous revision' do
  revision = @page.revisions.order('created_at asc').first
  @page.revert_to! revision
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 features/step_definitions/theme_steps.rb
landable-1.12.3 features/step_definitions/theme_steps.rb
landable-1.12.2 features/step_definitions/theme_steps.rb
landable-1.12.1 features/step_definitions/theme_steps.rb
landable-1.11.1 features/step_definitions/theme_steps.rb
landable-1.11.0 features/step_definitions/theme_steps.rb
landable-1.10.0.rc2 features/step_definitions/theme_steps.rb
landable-1.10.0.rc1 features/step_definitions/theme_steps.rb
landable-1.9.2 features/step_definitions/theme_steps.rb
landable-1.9.1 features/step_definitions/theme_steps.rb
landable-1.9.0 features/step_definitions/theme_steps.rb
landable-1.9.0.rc2 features/step_definitions/theme_steps.rb
landable-1.9.0.rc1 features/step_definitions/theme_steps.rb
landable-1.8.0 features/step_definitions/theme_steps.rb
landable-1.7.1.rc1 features/step_definitions/theme_steps.rb
landable-1.7.0 features/step_definitions/theme_steps.rb