neverfails 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +1 -0
- data/README.md +1 -1
- data/create-grocery.sh +14 -12
- data/{fails_steps.rb → lib/neverfails/fails_steps.rb} +0 -0
- data/neverfails.gemspec +1 -1
- metadata +4 -4
data/HISTORY.md
CHANGED
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
|
------------------------------
|
data/create-grocery.sh
CHANGED
@@ -1,30 +1,32 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
# This script shows what the latest version neverfails is able to do.
|
3
|
-
#
|
4
|
-
#
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
23
|
-
|
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
|
File without changes
|
data/neverfails.gemspec
CHANGED
@@ -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.
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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
|