Browse files

nuke cucumber specs

  • Loading branch information...
1 parent 3cf19c4 commit 26aeb78b9848d771ceecc6bed669ea2c705424e1 @atmos committed Nov 23, 2010
View
7 Gemfile
@@ -10,12 +10,11 @@ group :runtime do
end
group :test do
- gem 'rack-test', '~>0.5.0', :require => 'rack/test'
+ gem 'rake'
gem 'webrat', '~>0.7.0'
gem 'rspec', '~>1.2.9', :require => 'spec'
- gem 'rake'
- gem 'addressable', :require => 'addressable/uri'
- gem 'cucumber', '~>0.5.1'
+ gem 'rack-test', '~>0.5.0', :require => 'rack/test'
gem 'randexp'
+ gem 'addressable', :require => 'addressable/uri'
gem 'ParseTree', :require => 'parse_tree'
end
View
15 Gemfile.lock
@@ -8,21 +8,10 @@ GEM
ZenTest (~> 4.3)
ZenTest (4.4.0)
addressable (2.2.2)
- builder (3.0.0)
- cucumber (0.5.3)
- builder (>= 2.1.2)
- diff-lcs (>= 1.1.2)
- json_pure (>= 1.2.0)
- polyglot (>= 0.2.9)
- term-ansicolor (>= 1.0.4)
- treetop (>= 1.4.2)
- diff-lcs (1.1.2)
guid (0.1.1)
haml (3.0.24)
json (1.4.6)
- json_pure (1.4.6)
nokogiri (1.4.4)
- polyglot (0.3.1)
rack (1.2.1)
rack-contrib (0.9.2)
rack (>= 0.9.1)
@@ -38,11 +27,8 @@ GEM
sinatra (1.1.0)
rack (~> 1.1)
tilt (~> 1.1)
- term-ansicolor (1.0.5)
test-spec (0.9.0)
tilt (1.1)
- treetop (1.4.9)
- polyglot (>= 0.3.1)
webrat (0.7.2)
nokogiri (>= 1.2.0)
rack (>= 1.0)
@@ -54,7 +40,6 @@ PLATFORMS
DEPENDENCIES
ParseTree
addressable
- cucumber (~> 0.5.1)
guid (~> 0.1.1)
haml (~> 3.0.0)
json
View
8 Rakefile
@@ -47,17 +47,11 @@ task :make_spec do
end
end
-task :default => [:spec, :cucumber]
+task :default => [:spec]
require 'spec/rake/spectask'
desc "Run specs"
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = %w(-fp --color)
end
-
-require 'cucumber/rake/task'
-Cucumber::Rake::Task.new do |t|
- t.libs << 'lib'
- t.cucumber_opts = "--format pretty"
-end
View
28 features/sessions.feature
@@ -1,28 +0,0 @@
-Feature: Logging In to an SSO Account
- In order to authenticate existing users
- As an existing user
- Background:
- Given a valid consumer and user exists
-
- Scenario: I am not logged in and I (GET /)
- When I request the landing page
- Then I should be prompted to login
- When I login
- Then I am greeted
-
- Scenario: I am not logged in and redirected from a consumer
- When I request authentication returning to the consumer app
- Then I should be prompted to login
- When I login
- Then I should be redirected to the consumer app to start the handshake
-
- Scenario: I am not logged in and I (GET /sso/login)
- When I request the login page
- Then I should be prompted to login
- When I login
- Then I am greeted
-
- Scenario: I am not logged in and redirected from an unauthorized consumer
- Then I login
- When I request the login page
- Then I am greeted
View
13 features/step_definitions/forms.rb
@@ -1,13 +0,0 @@
-Then \
- /^I login$/ do
- fill_in :email, :with => @user.email
- fill_in :password, :with => @user.password
-
- click_button 'Login'
-end
-
-Then \
- /^I can login as the new user$/ do
- Then "I login"
- Then "I am greeted"
-end
View
27 features/step_definitions/html.rb
@@ -1,27 +0,0 @@
-Then \
- /^I should be prompted to login$/ do
- last_response.should be_a_login_form
-end
-
-Then \
- /^I am redirected to the consumer app$/ do
- last_response.headers['Location'].should eql(@consumer.url)
-end
-
-Then \
- /^I should receive a registration url via email$/ do
- @confirmation_url = last_response.body.to_s.match(%r!/sso/register/\w{40}!).to_s
- @confirmation_url.should_not match(/^\s*$/)
-end
-
-Then \
- /^I should be redirected to the consumer app to start the handshake$/ do
- redirection = Addressable::URI.parse(last_response.headers['Location'])
-
- "#{redirection.scheme}://#{redirection.host}#{redirection.path}".should eql(@consumer.url)
-end
-
-Then \
- /^I am greeted$/ do
- last_response.should have_selector("h3:contains('Hello #{@user.full_name}')")
-end
View
19 features/step_definitions/requests.rb
@@ -1,19 +0,0 @@
-When \
- /^I request the login page$/ do
- visit '/sso/login'
-end
-
-When \
- /^I request the landing page$/ do
- visit '/'
-end
-
-When \
- /^I request authentication returning to the consumer app$/ do
- params = {
- "openid.ns" => "http://specs.openid.net/auth/2.0",
- "openid.mode" => "checkid_setup",
- "openid.return_to" => @consumer.url
- }
- visit "/sso", :get, params
-end
View
5 features/step_definitions/sessions_steps.rb
@@ -1,5 +0,0 @@
-Given \
- /^a valid consumer and user exists$/ do
- @consumer = ::Hancock::Consumer.gen(:internal)
- @user = ::Hancock::User.gen
-end
View
25 features/support/env.rb
@@ -1,25 +0,0 @@
-require File.join(File.dirname(__FILE__), '..', '..', 'spec', 'spec_helper')
-
-class Webrat::Field
- def escaped_value
- @value.to_s
- end
-end
-
-module HancockAppHelper
- def app
- Hancock::TestApp.app
- end
-
- include Rack::Test::Methods
- include Webrat::Methods
- include Webrat::Matchers
- include Hancock::Matchers
-end
-
-World(HancockAppHelper)
-
-Before do
- DataMapper.auto_migrate!
- visit '/sso/logout' # log us out if we're logged in
-end

0 comments on commit 26aeb78

Please sign in to comment.