david-merb_cucumber 0.4.1 → 0.5.0

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/README.textile CHANGED
@@ -2,11 +2,26 @@ h1. merb_cucumber
2
2
 
3
3
  Merb + Cucumber integration with Webrat support.
4
4
 
5
+ h2. Migrating to merb_cucumber 0.5.0
6
+
7
+ merb_cucumber 0.5.0 now requires cucumber 0.1.13, which introduces some breaking changes. If you were already using
8
+ merb_cucumber, you'll need to do the following:
9
+
10
+ * Change the last line of bin/cucumber to be:
11
+
12
+ Cucumber::CLI.execute []
13
+
14
+ * Add a cucumber.yml to your Merb.root with the following contents:
15
+
16
+ default: --format pretty features
17
+
18
+ If you experience any problems, please contact me (david) on github.
19
+
5
20
  h2. Requirements
6
21
 
7
- * merb-core >= 1.0
8
- * cucumber >= 0.1.9
9
- * webrat >= 0.3.1 (Optional)
22
+ * merb-core >= 1.0.6.1
23
+ * cucumber >= 0.1.13
24
+ * webrat >= 0.3.2 (Optional)
10
25
 
11
26
  h2. First Time
12
27
 
@@ -30,4 +45,4 @@ h2. Notes
30
45
 
31
46
  * When you are implementing the steps of an scenario, please use the new request test helper, if you try to use the
32
47
  dispatch_to method, it won't work as expected.
33
- * Webrat methods other than 'visits' are now singular only.
48
+ * Webrat methods other than 'visits' are now singular only.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'merb-core'
5
5
  require 'merb-core/tasks/merb'
6
6
 
7
7
  GEM_NAME = "merb_cucumber"
8
- GEM_VERSION = "0.4.1"
8
+ GEM_VERSION = "0.5.0"
9
9
  AUTHOR = ["Roman Gonzalez", "David Leal"]
10
10
  EMAIL = ["romanandreg@gmail.com", "dgleal@gmail.com"]
11
11
  HOMEPAGE = "http://github.com/david/merb_cucumber"
@@ -23,8 +23,8 @@ spec = Gem::Specification.new do |s|
23
23
  s.authors = AUTHOR
24
24
  s.email = EMAIL
25
25
  s.homepage = HOMEPAGE
26
- s.add_dependency('merb-core', '~> 1.0')
27
- s.add_dependency('cucumber', '>= 0.1.9')
26
+ s.add_dependency('merb-core', '~> 1.0.6.1')
27
+ s.add_dependency('cucumber', '>= 0.1.13')
28
28
  s.require_path = 'lib'
29
29
  s.files = %w(LICENSE README.textile Rakefile TODO Generators) + Dir.glob("{lib,spec}/**/*")
30
30
  end
@@ -27,6 +27,7 @@ module Merb::Generators
27
27
  end
28
28
 
29
29
  template(:cucumber, :after => :chmod) { |t| t.source = t.destination = "bin/cucumber" }
30
+ template(:cucumber_yml) { |t| t.source = t.destination = "cucumber.yml" }
30
31
 
31
32
  def chmod(action)
32
33
  File.chmod(0755, action.destination)
@@ -12,4 +12,4 @@ if File.directory?(gems_dir = File.join(Dir.pwd, 'gems')) ||
12
12
  end
13
13
 
14
14
  require 'cucumber/cli'
15
- Cucumber::CLI.execute
15
+ Cucumber::CLI.execute []
@@ -0,0 +1 @@
1
+ default: -r features/steps -r features/support --format pretty features
@@ -0,0 +1,19 @@
1
+ Feature: Login
2
+ To ensure the safety of the application
3
+ A regular user of the system
4
+ Must authenticate before using the app
5
+
6
+ Scenario Outline: Failed Login
7
+ Given I am not authenticated
8
+ When I go to /login
9
+ And I fill in "login" with "<mail>"
10
+ And I fill in "password" with "<password>"
11
+ And I press "Log In"
12
+ Then the login request should fail
13
+ Then I should see an error message
14
+
15
+ Examples:
16
+ | mail | password |
17
+ | not_an_address | nil |
18
+ | not@not | 123455 |
19
+ | 123@abc.com | wrong_paasword |
@@ -0,0 +1,3 @@
1
+ Given /^I am not authenticated$/ do
2
+ # yay!
3
+ end
@@ -19,5 +19,9 @@ require "merb_cucumber/helpers/activerecord"
19
19
  # Uncomment if you want transactional fixtures
20
20
  # Merb::Test::World::Base.use_transactional_fixtures
21
21
 
22
+ # Quick fix for post features running Rspec error, see
23
+ # http://gist.github.com/37930
24
+ def Spec.run? ; true; end
25
+
22
26
  Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test')
23
27
 
@@ -2,7 +2,6 @@ require 'cucumber/rake/task'
2
2
 
3
3
  cucumber_options = proc do |t|
4
4
  t.binary = Merb.root / 'bin' / 'cucumber'
5
- t.cucumber_opts = "--format pretty"
6
5
  end
7
6
 
8
7
  Cucumber::Rake::Task.new(:features, &cucumber_options)
@@ -7,6 +7,10 @@ describe "common files generator", :shared => true do
7
7
  @generator.should create('/tmp/features/support/env.rb')
8
8
  end
9
9
 
10
+ it "should generate the cucumber.yml file" do
11
+ @generator.should create('/tmp/cucumber.yml')
12
+ end
13
+
10
14
  it "should generate the bin/cucumber file" do
11
15
  @generator.should create('/tmp/bin/cucumber')
12
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: david-merb_cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Gonzalez
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-12-17 00:00:00 -08:00
13
+ date: 2008-12-21 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: "1.0"
23
+ version: 1.0.6.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: cucumber
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.1.9
32
+ version: 0.1.13
33
33
  version:
34
34
  description: Cucumber integration for Merb
35
35
  email:
@@ -56,13 +56,16 @@ files:
56
56
  - lib/generators/cucumber/templates/features
57
57
  - lib/generators/cucumber/templates/features/support
58
58
  - lib/generators/cucumber/templates/features/support/env.rb
59
+ - lib/generators/cucumber/templates/features/authentication
60
+ - lib/generators/cucumber/templates/features/authentication/steps
61
+ - lib/generators/cucumber/templates/features/authentication/steps/login_steps.rb
62
+ - lib/generators/cucumber/templates/features/authentication/login.feature
59
63
  - lib/generators/cucumber/templates/features/steps
60
64
  - lib/generators/cucumber/templates/features/steps/webrat_steps.rb
61
65
  - lib/generators/cucumber/templates/features/steps/result_steps.rb
62
- - lib/generators/cucumber/templates/features/steps/login_steps.rb
63
- - lib/generators/cucumber/templates/features/login.feature
64
66
  - lib/generators/cucumber/templates/autotest
65
67
  - lib/generators/cucumber/templates/autotest/cucumber_merb_rspec.rb
68
+ - lib/generators/cucumber/templates/cucumber.yml
66
69
  - lib/generators/cucumber/templates/bin
67
70
  - lib/generators/cucumber/templates/bin/cucumber
68
71
  - lib/generators/cucumber/templates/lib