Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmoon committed Jul 15, 2011
1 parent 576179f commit 8b29623
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -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
25 changes: 24 additions & 1 deletion Gemfile.lock
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -108,5 +131,5 @@ DEPENDENCIES
jquery-rails
pg
rails (= 3.0.5)
rspec-rails (~> 2.4)
sqlite3
steak
4 changes: 4 additions & 0 deletions spec/acceptance/acceptance_helper.rb
@@ -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}
13 changes: 13 additions & 0 deletions spec/acceptance/rankings_spec.rb
@@ -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
6 changes: 6 additions & 0 deletions spec/acceptance/support/helpers.rb
@@ -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
9 changes: 9 additions & 0 deletions spec/acceptance/support/paths.rb
@@ -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
4 changes: 2 additions & 2 deletions spec/helpers/application_helper_spec.rb
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions spec/helpers/matches_helper_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 8b29623

Please sign in to comment.