squash 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
1
  squash-*.gem
2
2
  **/.DS_Store
3
- .rvmrc
4
3
  template/Gemfile.lock
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.2@squash_development
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- squash (0.0.4)
4
+ squash (0.0.5)
5
5
  akephalos
6
6
  cucumber
7
7
  rspec
data/README.markdown CHANGED
@@ -1,9 +1,11 @@
1
1
  # Squash
2
2
 
3
- A test application framework
3
+ A generator of Squashes
4
4
 
5
5
  ## Description
6
6
 
7
+ This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps.
8
+
7
9
  I spent a huge amount of time building Cucumber-based stacks to test my web applications. There are so many options, and sometimes they don't really get together. Should I use Cucumber/RSpec/Webrat/Mechanize, Cucumber/RSpec/Capybara/Selenium, Cucumber/Watir, or what else? How do I solve all the version conflicts that seem to spring out of nowhere when I put these libraries together? How do I wire up all the pieces in a stand-alone, non-Rails application?
8
10
 
9
11
  Squash tries to save some time by generating a Cucumber-powered, Bundler-enabled web test application that is fully wired with the current popular favorite mix of gems: Cucumber, RSpec, Capybara and Akephalos. Once you've generated the Squash application, you can write your own features to
data/Rakefile CHANGED
@@ -5,13 +5,6 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
5
5
  require 'squash/version'
6
6
 
7
7
  namespace :gem do
8
- desc "Install the current version as a local gem"
9
- task :install do
10
- system "gem build squash.gemspec"
11
- system "gem install squash-#{Squash::VERSION}.gem"
12
- File.delete "squash-#{Squash::VERSION}.gem"
13
- end
14
-
15
8
  desc "Publish the current version to the world"
16
9
  task :publish do
17
10
  system "bundle exec cucumber -q"
@@ -8,5 +8,13 @@ Given I'm in an empty directory
8
8
  When I run "bundle exec squash clickmonkey"
9
9
  And I cd to "clickmonkey"
10
10
  And I run "bundle install"
11
+ And I run "bundle exec rake self_test"
12
+ Then the output should contain "1 scenario (1 passed)"
13
+
14
+ Scenario: Run example
15
+ Given I'm in an empty directory
16
+ When I run "bundle exec squash clickmonkey"
17
+ And I cd to "clickmonkey"
18
+ And I run "bundle install"
11
19
  And I run "bundle exec cucumber"
12
20
  Then the output should contain "1 scenario (1 passed)"
@@ -2,3 +2,13 @@ require 'rubygems'
2
2
  require 'bundler/setup'
3
3
 
4
4
  require 'aruba/cucumber'
5
+
6
+ Before do
7
+ system "rvm gemset create tmp"
8
+ system "rvm gemset use tmp"
9
+ end
10
+
11
+ After do
12
+ system "rvm --force gemset delete tmp"
13
+ system "rvm gemset use squash_development"
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Squash
2
2
  unless defined?(Squash::VERSION)
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
data/squash.gemspec CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.name = 'squash'
6
6
  s.version = Squash::VERSION
7
7
  s.authors = ['Paolo "Nusco" Perrotta']
8
- s.description = 'A test application framework'
9
- s.summary = "..."
8
+ s.description = 'This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps. See (link)'
9
+ s.summary = 'A generator of Squashes'
10
10
  s.require_path = "lib"
11
11
  s.email = 'paolo.nusco.perrotta@gmail.com'
12
12
  s.homepage = 'https://github.com/nusco/squash'
@@ -15,17 +15,19 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.rubygems_version = "1.3.7"
17
17
 
18
- s.add_dependency 'cucumber'
19
- s.add_dependency 'rspec'
20
- # s.add_dependency 'capybara' # at the moment, version conflict with the capybara required by akephalos
21
- s.add_dependency 'akephalos'
22
- s.add_dependency 'syntax' # Colored sintax in Cucumber's HTML output
23
-
24
18
  s.rubyforge_project = "nowarning" # FIXME: any way around this?
25
19
 
26
- s.add_development_dependency 'rake'
27
- s.add_development_dependency 'aruba'
20
+ s.add_dependency 'cucumber'
21
+ s.add_dependency 'rspec'
22
+ # s.add_dependency 'capybara' # at the moment, version conflict with the capybara required by akephalos
23
+ s.add_dependency 'akephalos'
24
+ s.add_dependency 'syntax' # Colored sintax in Cucumber's HTML output
25
+
26
+ s.rubyforge_project = "nowarning" # FIXME: any way around this?
28
27
 
28
+ s.add_development_dependency 'rake'
29
+ s.add_development_dependency 'aruba'
30
+
29
31
  # s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
30
32
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
31
33
  s.extra_rdoc_files = ["LICENSE", "README.markdown"]
data/template/.rvmrc ADDED
@@ -0,0 +1,7 @@
1
+ # This file is only useful if you use RVM (http://rvm.beginrescueend.com).
2
+ # If you don't use RVM, you should!
3
+ #
4
+ # I assume that you have Ruby 1.9.2 installed.
5
+ # You'll also need to create a gemset named "squash".
6
+ #
7
+ rvm use 1.9.2@squash
data/template/Gemfile CHANGED
@@ -1,9 +1,8 @@
1
1
  source :rubygems
2
2
 
3
- gem 'squash' , '= 0.0.4'
4
-
5
3
  gem 'cucumber' , '~> 0.10.0'
6
4
  gem 'rspec' , '~> 2.3.0'
7
5
  #gem 'capybara' , '~> 0.4.0' # at the moment, version conflict with the capybara required by akephalos
8
6
  gem 'akephalos' , '~> 0.2.4'
7
+
9
8
  gem 'syntax' , '~> 1.0.0' # Colored sintax in Cucumber's HTML output
@@ -0,0 +1,9 @@
1
+ Feature: This is an example
2
+ As a developer
3
+ I want an example Squash feature
4
+ So that I can see what it looks like
5
+
6
+ Scenario: Try out this Web thing
7
+ Given I am on Wikipedia
8
+ And I follow "Italiano"
9
+ Then I should see "Benvenuti su Wikipedia"
@@ -0,0 +1,10 @@
1
+ Feature: Self test
2
+ As a developer
3
+ I want to check that all the gems in the Squash stack play nice together
4
+ So that I can verify that the entire stack works even after updating my bundle
5
+
6
+ Scenario: Go to the web and click around a bit
7
+ Given I am on http://www.rubygems.org
8
+ When I fill in "query" with "squash"
9
+ And I press "Search"
10
+ Then I should see "test"
@@ -1,9 +1,9 @@
1
- Given /^(?:|I )am on (.+)$/ do |page_name|
2
- visit path_to(page_name)
1
+ Given /^(?:|I )am on (.+)$/ do |page|
2
+ visit path_to(page)
3
3
  end
4
4
 
5
- When /^(?:|I )go to (.+)$/ do |page_name|
6
- visit path_to(page_name)
5
+ When /^(?:|I )go to (.+)$/ do |page|
6
+ visit path_to(page)
7
7
  end
8
8
 
9
9
  When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
@@ -1,4 +1,11 @@
1
1
  require 'rubygems'
2
+ require 'bundler/setup'
2
3
 
3
4
  require File.expand_path(File.join(File.dirname(__FILE__), "paths"))
4
- require 'squash'
5
+
6
+ require 'akephalos'
7
+ Capybara.default_driver = :akephalos
8
+
9
+ #After do
10
+ # Capybara.reset_sessions!
11
+ #end
@@ -1,12 +1,14 @@
1
1
  module NavigationHelpers
2
- def path_to(page_name)
3
- case page_name
2
+ def path_to(page)
3
+ return page if page.start_with?('http://')
4
+
5
+ case page
4
6
 
5
- when /RubyGems.org/
6
- 'http://www.rubygems.org/'
7
+ when /Wikipedia/
8
+ 'http://www.wikipedia.org/'
7
9
 
8
10
  else
9
- raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
11
+ raise "Can't find mapping from \"#{page}\" to a path.\n" +
10
12
  "Now, go and add a mapping in #{__FILE__}"
11
13
  end
12
14
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paolo "Nusco" Perrotta
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-17 00:00:00 +01:00
17
+ date: 2011-01-05 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -95,7 +95,7 @@ dependencies:
95
95
  type: :development
96
96
  prerelease: false
97
97
  version_requirements: *id006
98
- description: A test application framework
98
+ description: This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps. See (link)
99
99
  email: paolo.nusco.perrotta@gmail.com
100
100
  executables:
101
101
  - squash
@@ -106,6 +106,7 @@ extra_rdoc_files:
106
106
  - README.markdown
107
107
  files:
108
108
  - .gitignore
109
+ - .rvmrc
109
110
  - Gemfile
110
111
  - Gemfile.lock
111
112
  - LICENSE
@@ -116,14 +117,14 @@ files:
116
117
  - features/run_empty_scaffold_application.feature
117
118
  - features/step_definitions/squash_steps.rb
118
119
  - features/support/env.rb
119
- - lib/squash.rb
120
120
  - lib/squash/version.rb
121
- - lib/squash/web_steps.rb
122
121
  - squash.gemspec
122
+ - template/.rvmrc
123
123
  - template/Gemfile
124
124
  - template/cucumber.yaml
125
- - template/features/smoke_test.feature
126
- - template/step_definitions/example_steps.rb
125
+ - template/features/example.feature
126
+ - template/self_test.feature
127
+ - template/step_definitions/web_steps.rb
127
128
  - template/support/env.rb
128
129
  - template/support/paths.rb
129
130
  has_rdoc: true
@@ -140,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
142
  - - ">="
142
143
  - !ruby/object:Gem::Version
143
- hash: 1647676223693851052
144
+ hash: -3445518033253357239
144
145
  segments:
145
146
  - 0
146
147
  version: "0"
@@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - ">="
151
152
  - !ruby/object:Gem::Version
152
- hash: 1647676223693851052
153
+ hash: -3445518033253357239
153
154
  segments:
154
155
  - 0
155
156
  version: "0"
@@ -159,6 +160,6 @@ rubyforge_project: nowarning
159
160
  rubygems_version: 1.3.7
160
161
  signing_key:
161
162
  specification_version: 3
162
- summary: ...
163
+ summary: A generator of Squashes
163
164
  test_files: []
164
165
 
data/lib/squash.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler/setup'
2
-
3
- require 'akephalos'
4
- Capybara.default_driver = :akephalos
5
-
6
- #After do
7
- # Capybara.reset_sessions!
8
- #end
9
-
10
- require 'squash/web_steps'
@@ -1,11 +0,0 @@
1
- Feature: This is a smoke test
2
- As a developer
3
- I want to run a smoke-test scenario in this brand new Squash app
4
- So that I can verify that the entire stack works
5
-
6
- Scenario: Search on RubyGems
7
- Given I'm new to Squash
8
- And I go to RubyGems.org
9
- And I fill in "query" with "squash"
10
- And I press "Search"
11
- Then I should see "A test application framework"
@@ -1,2 +0,0 @@
1
- Given /^I'm new to Squash$/ do
2
- end