Sha256: e0eeb5d1cf65b1466a592066b04027cecb92f3b4ee10643f01ae5f582765fc96

Contents?: true

Size: 1.36 KB

Versions: 29

Compression:

Stored size: 1.36 KB

Contents

When /^I bootstrap the application for clearance$/ do
  steps %{
    When I remove the file "public/index.html"
    And I successfully run "rails generate cucumber:install"
    And I successfully run "rails generate clearance:install"
    And I successfully run "rails generate clearance:features"
    And I configure ActionMailer to use "www.example.com" as a host
    And I add flash messages to the layout
    And I add session links to the layout
    And I configure "clearance/sessions#new" as the root route
    And I disable Capybara Javascript emulation
  }
end

When /^I add flash messages to the layout$/ do
  flashes = %{
    <% flash.each do |key, value| -%>
      <%= value %>
    <% end -%>
  }

  replace_in_file "app/views/layouts/application.html.erb",
                  /(<body>)/,
                  "\\1\n#{flashes}"
end

When /^I add session links to the layout$/ do
  links = %{
    <% if signed_in? -%>
      <%= link_to 'Sign out', sign_out_path, :method => :delete %>
    <% else -%>
      <%= link_to 'Sign in', sign_in_path %>
    <% end -%>
  }

  replace_in_file "app/views/layouts/application.html.erb",
                  /(<body>)/,
                  "\\1\n#{links}"
end

When /^I configure "([^"]*)" as the root route$/ do |action|
  replace_in_file "config/routes.rb",
                  /(routes\.draw do)/,
                  "\\1\nroot :to => '#{action}'"
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
saucy-0.10.10 features/step_definitions/clearance_steps.rb
saucy-0.10.9 features/step_definitions/clearance_steps.rb
saucy-0.10.8 features/step_definitions/clearance_steps.rb
saucy-0.10.7 features/step_definitions/clearance_steps.rb
saucy-0.10.6 features/step_definitions/clearance_steps.rb
saasy-0.0.2.alpha3 features/step_definitions/clearance_steps.rb
saasy-0.0.2.alpha2 features/step_definitions/clearance_steps.rb
saasy-0.0.2.alpha1 features/step_definitions/clearance_steps.rb
saucy-0.10.5 features/step_definitions/clearance_steps.rb
saucy-0.10.4 features/step_definitions/clearance_steps.rb
saucy-0.10.3 features/step_definitions/clearance_steps.rb
saucy-0.10.2 features/step_definitions/clearance_steps.rb
saucy-0.10.1 features/step_definitions/clearance_steps.rb
saucy-0.10.0 features/step_definitions/clearance_steps.rb
saucy-0.9.1 features/step_definitions/clearance_steps.rb
saucy-0.9.0 features/step_definitions/clearance_steps.rb
saucy-0.8.5 features/step_definitions/clearance_steps.rb
saucy-0.8.4 features/step_definitions/clearance_steps.rb
saucy-0.8.3 features/step_definitions/clearance_steps.rb
saasy-0.0.1 features/step_definitions/clearance_steps.rb