Permalink
Browse files

wip

  • Loading branch information...
1 parent 576179f commit 8b296234dc605882d1894b79b857528412207c3b @seanmoon seanmoon committed Jul 15, 2011
View
@@ -7,9 +7,9 @@ gem 'jquery-rails'
group :test, :development do
gem 'sqlite3'
- gem 'rspec-rails', '~> 2.4'
+ gem 'steak'
end
group :production do
gem 'pg'
-end
+end
View
@@ -30,10 +30,20 @@ GEM
activesupport (3.0.5)
arel (2.0.9)
builder (2.1.2)
+ capybara (1.0.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 0.2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.1.9)
+ ffi (~> 1.0.6)
configuration (1.2.0)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
+ ffi (1.0.9)
haml (3.0.25)
haml-rails (0.3.4)
actionpack (~> 3.0)
@@ -48,6 +58,7 @@ GEM
jquery-rails (1.0)
rails (~> 3.0)
thor (~> 0.14)
+ json_pure (1.5.3)
launchy (0.3.7)
configuration (>= 0.0.5)
rake (>= 0.8.1)
@@ -57,6 +68,7 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
+ nokogiri (1.5.0)
pg (0.10.1)
polyglot (0.3.1)
rack (1.2.2)
@@ -93,11 +105,22 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.5.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.2.2)
+ childprocess (>= 0.1.9)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
sqlite3 (1.3.3)
+ steak (2.0.0)
+ capybara (>= 1.0.0)
+ rspec-rails (>= 2.5.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.25)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
@@ -108,5 +131,5 @@ DEPENDENCIES
jquery-rails
pg
rails (= 3.0.5)
- rspec-rails (~> 2.4)
sqlite3
+ steak
@@ -0,0 +1,4 @@
+require 'spec_helper'
+
+# Put your acceptance spec helpers inside spec/acceptance/support
+Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
@@ -0,0 +1,13 @@
+require 'acceptance/acceptance_helper'
+
+feature 'Rankings' do
+
+ background do
+ Match.create
+ end
+
+ scenario 'should show rankings broken down by date' do
+ true.should == true
+ end
+
+end
@@ -0,0 +1,6 @@
+module HelperMethods
+ # Put helper methods you need to be available in all acceptance specs here.
+
+end
+
+RSpec.configuration.include HelperMethods, :type => :acceptance
@@ -0,0 +1,9 @@
+module NavigationHelpers
+ # Put helper methods related to the paths in your application here.
+
+ def homepage
+ "/"
+ end
+end
+
+RSpec.configuration.include NavigationHelpers, :type => :acceptance
@@ -7,12 +7,12 @@
helper.location.should == "NYC"
end
end
-
+
context "when a location is configured" do
before do
ENV["PIVOT_PONG_LOCATION"] = "Starbase Alpha"
end
-
+
it "returns that location" do
helper.location.should == "Starbase Alpha"
end
@@ -34,13 +34,13 @@
end
it { should == ["P1", "P4", "P2", "P3"] }
end
-
+
it "uses case-insensitive comparisons" do
helper.calculate_rankings([Match.create(winner: "p1", loser: "P2"), Match.create(winner: "P1", loser: "p2")]).should == ["P1", "P2"]
end
-
+
it "titleizes the rankings" do
- helper.calculate_rankings([Match.create(winner: "joe blow", loser: "jane doe"), Match.create(winner: "joe blow", loser: "spot")]).should ==
+ helper.calculate_rankings([Match.create(winner: "joe blow", loser: "jane doe"), Match.create(winner: "joe blow", loser: "spot")]).should ==
["Joe Blow", "Jane Doe", "Spot"]
end
end

0 comments on commit 8b29623

Please sign in to comment.