neverfails 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.md CHANGED
@@ -1,3 +1,4 @@
1
1
  v0.0.1 2011.08.07 Created the neverfails gem
2
2
  v0.0.2 2011.03.01 Added the create-grocery.sh sample script
3
3
  v0.0.3 2011.03.01 Fixed bug on '/models/index' URL in the test
4
+ v0.0.4 2011.03.01 Included fails_steps in the neverfails gem
data/README.md CHANGED
@@ -70,7 +70,7 @@ For the sake of the `grocery` example, we define the three steps of the `No appl
70
70
  * *When I browse the list of apples*: this step passes if a page exists listing apples and if I can open that page in a browser
71
71
  * *Then I should see the text "No apples left"*: this step passes if I see the text "No apples left" in that page
72
72
 
73
- The file `fails_steps.rb` in this package contains these definition in Ruby and capybara code.
73
+ The file `lib/neverfails/fails_steps.rb` in this package contains these definition in Ruby and capybara code.
74
74
 
75
75
  Step 3 (Run and watch it fail)
76
76
  ------------------------------
@@ -1,30 +1,32 @@
1
1
  #!/bin/bash
2
2
  # This script shows what the latest version neverfails is able to do.
3
- # NOTE: For the sake of speed, this script assumes all the required gems
4
- # are already installed in the system, so 'bundle install --local' is used.
3
+ # For the sake of speed, if all the required gems are already installed in the
4
+ # system, invoke with --local, so 'bundle install --local' is used.
5
5
 
6
6
  # The script creates a Rails application called 'grocery', adds a feature
7
7
  # called banana and runs neverfails to creates the Rails code that generates
8
8
  # the Banana model, controller, index view with a given text and sets the
9
9
  # route to this view
10
10
 
11
+ rm -rf grocery
11
12
  rails new grocery -JT
12
13
  cd grocery
13
- rm public/index.html
14
- rm public/images/rails.png
15
- echo -e '\ngem "cucumber"' >> Gemfile
16
- echo -e '\ngem "cucumber-rails"' >> Gemfile
17
- echo -e '\ngem "neverfails"' >> Gemfile
18
- bundle install --local
14
+ echo "gem 'cucumber'
15
+ gem 'cucumber-rails'
16
+ gem 'neverfails'" >> Gemfile
17
+ if [ "$1" = "--local" ]
18
+ then
19
+ bundle install --local
20
+ else
21
+ bundle install
22
+ fi
19
23
  rails g cucumber:install
20
24
  echo "require 'cucumber/rails'
21
25
  require 'neverfails'
22
- Rails.configuration.cache_classes = false
23
- Capybara.default_selector = :css
24
- ActionController::Base.allow_rescue = false" >| features/support/env.rb
26
+ require 'neverfails/fails_steps'
27
+ Rails.configuration.cache_classes = false" >| features/support/env.rb
25
28
  sed -i '' -e's/<<: \*test/<<: *development/' config/database.yml
26
29
  rake db:create
27
- cp ../fails_steps.rb features/step_definitions/
28
30
  echo "Feature: Bananas
29
31
  Scenario: No bananas left
30
32
  Given there are no bananas
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'neverfails'
6
- s.version = '0.0.3'
6
+ s.version = '0.0.4'
7
7
  s.authors = ["Claudio B."]
8
8
  s.email = ["claudiob@gmail.com"]
9
9
  s.homepage = "https://github.com/claudiob/neverfails/tree/rails"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neverfails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Claudio B.
@@ -63,8 +63,8 @@ files:
63
63
  - README.md
64
64
  - TODO.md
65
65
  - create-grocery.sh
66
- - fails_steps.rb
67
66
  - lib/neverfails.rb
67
+ - lib/neverfails/fails_steps.rb
68
68
  - neverfails.gemspec
69
69
  has_rdoc: true
70
70
  homepage: https://github.com/claudiob/neverfails/tree/rails