mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 09:04:21 +01:00
Next step in upgrading Tracks to Rails 2.2. Some highlights:
* Ran rake rails:update * Added old actionwebservice framework * Updated RSpec and RSpec-Rails * Removed asset_packager plugin (not compatible, Scott no longer maintaining), and replaced with bundle_fu. See the bundle_fu README for more info. * Hacks to UJS and ARTS plugins, which are no longer supported. Probably should move off both UJS and RJS. * Hack to flashobject_helper plugin (upgrade to Rails 2.2-compatible version if/when it comes out.) * Hack to skinny-spec plugin, for Rails 2.2 compatibility. Should check for official release. * Hacks to resource_feeder plugin, for Rails 2.2 compatibility. Should check for official release (not likely) or move off it. * Addressed some deprecation warnings. More to come. * My mobile mime type hackery is no longer necessary with new Rails features. Yay! * Updated environment.rb.tmpl with changes TODO: * Restore view specs marked pending * Fix failing integration tests. * Try selenium tests. * Investigate OpenID support. * Address deprecation warnings. * Consider moving parts of environment.rb to initializers * Address annoying config.gem warning about highline gem
This commit is contained in:
parent
6d11ebd1b0
commit
35ae5fc431
394 changed files with 15184 additions and 9936 deletions
|
|
@ -5,15 +5,15 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|||
describe "Examples with no descriptions" do
|
||||
|
||||
# description is auto-generated as "should equal(5)" based on the last #should
|
||||
it do
|
||||
specify do
|
||||
3.should equal(3)
|
||||
5.should equal(5)
|
||||
end
|
||||
|
||||
it { 3.should be < 5 }
|
||||
specify { 3.should be < 5 }
|
||||
|
||||
it { ["a"].should include("a") }
|
||||
specify { ["a"].should include("a") }
|
||||
|
||||
it { [1,2,3].should respond_to(:size) }
|
||||
specify { [1,2,3].should respond_to(:size) }
|
||||
|
||||
end
|
||||
|
|
|
|||
33
vendor/plugins/rspec/examples/pure/yielding_example.rb
vendored
Normal file
33
vendor/plugins/rspec/examples/pure/yielding_example.rb
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
require File.dirname(__FILE__) + '/spec_helper'
|
||||
|
||||
class MessageAppender
|
||||
|
||||
def initialize(appendage)
|
||||
@appendage = appendage
|
||||
end
|
||||
|
||||
def append_to(message)
|
||||
if_told_to_yield do
|
||||
message << @appendage
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "a message expectation yielding to a block" do
|
||||
it "should yield if told to" do
|
||||
appender = MessageAppender.new("appended to")
|
||||
appender.should_receive(:if_told_to_yield).and_yield
|
||||
message = ""
|
||||
appender.append_to(message)
|
||||
message.should == "appended to"
|
||||
end
|
||||
|
||||
it "should not yield if not told to" do
|
||||
appender = MessageAppender.new("appended to")
|
||||
appender.should_receive(:if_told_to_yield)
|
||||
message = ""
|
||||
appender.append_to(message)
|
||||
message.should == ""
|
||||
end
|
||||
end
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
Story: cells with less than two neighbours die
|
||||
|
||||
As a game producer
|
||||
I want cells with less than two neighbours to die
|
||||
So that I can illustrate how the game works to people with money
|
||||
|
||||
Scenario: cells with zero or one neighbour die
|
||||
|
||||
Given the grid looks like
|
||||
........
|
||||
.XX.XX..
|
||||
.XX.....
|
||||
....X...
|
||||
........
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
........
|
||||
.XX.....
|
||||
.XX.....
|
||||
........
|
||||
........
|
||||
Story: cells with less than two neighbours die
|
||||
|
||||
As a game producer
|
||||
I want cells with less than two neighbours to die
|
||||
So that I can illustrate how the game works to people with money
|
||||
|
||||
Scenario: cells with zero or one neighbour die
|
||||
|
||||
Given the grid looks like
|
||||
........
|
||||
.XX.XX..
|
||||
.XX.....
|
||||
....X...
|
||||
........
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
........
|
||||
.XX.....
|
||||
.XX.....
|
||||
........
|
||||
........
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
Story: cells with more than three neighbours die
|
||||
|
||||
As a game producer
|
||||
I want cells with more than three neighbours to die
|
||||
So that I can show the people with money how we are getting on
|
||||
|
||||
Scenario: blink
|
||||
|
||||
Given the grid looks like
|
||||
.....
|
||||
...XX
|
||||
...XX
|
||||
.XX..
|
||||
.XX..
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
.....
|
||||
...XX
|
||||
....X
|
||||
.X...
|
||||
.XX..
|
||||
Story: cells with more than three neighbours die
|
||||
|
||||
As a game producer
|
||||
I want cells with more than three neighbours to die
|
||||
So that I can show the people with money how we are getting on
|
||||
|
||||
Scenario: blink
|
||||
|
||||
Given the grid looks like
|
||||
.....
|
||||
...XX
|
||||
...XX
|
||||
.XX..
|
||||
.XX..
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
.....
|
||||
...XX
|
||||
....X
|
||||
.X...
|
||||
.XX..
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
Story: Empty spaces with three neighbours create a cell
|
||||
|
||||
As a game producer
|
||||
I want empty cells with three neighbours to die
|
||||
So that I have a minimum feature set to ship
|
||||
|
||||
Scenario: the glider
|
||||
|
||||
Given the grid looks like
|
||||
...X..
|
||||
..X...
|
||||
..XXX.
|
||||
......
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X.X.
|
||||
..XX..
|
||||
...X..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X...
|
||||
..X.X.
|
||||
..XX..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
...X..
|
||||
.XX...
|
||||
..XX..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X...
|
||||
.X....
|
||||
.XXX..
|
||||
......
|
||||
Story: Empty spaces with three neighbours create a cell
|
||||
|
||||
As a game producer
|
||||
I want empty cells with three neighbours to die
|
||||
So that I have a minimum feature set to ship
|
||||
|
||||
Scenario: the glider
|
||||
|
||||
Given the grid looks like
|
||||
...X..
|
||||
..X...
|
||||
..XXX.
|
||||
......
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X.X.
|
||||
..XX..
|
||||
...X..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X...
|
||||
..X.X.
|
||||
..XX..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
...X..
|
||||
.XX...
|
||||
..XX..
|
||||
......
|
||||
When the next step occurs
|
||||
Then the grid should look like
|
||||
......
|
||||
..X...
|
||||
.X....
|
||||
.XXX..
|
||||
......
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
Story: I can create a cell
|
||||
|
||||
As a game producer
|
||||
I want to create a cell
|
||||
So that I can show the grid to people
|
||||
|
||||
Scenario: nothing to see here
|
||||
|
||||
Given a 3 x 3 game
|
||||
Then the grid should look like
|
||||
...
|
||||
...
|
||||
...
|
||||
|
||||
Scenario: all on its lonesome
|
||||
|
||||
Given a 3 x 3 game
|
||||
When I create a cell at 1, 1
|
||||
Then the grid should look like
|
||||
...
|
||||
.X.
|
||||
...
|
||||
|
||||
Scenario: the grid has three cells
|
||||
|
||||
Given a 3 x 3 game
|
||||
When I create a cell at 0, 0
|
||||
and I create a cell at 0, 1
|
||||
and I create a cell at 2, 2
|
||||
Then the grid should look like
|
||||
XX.
|
||||
...
|
||||
..X
|
||||
|
||||
Scenario: more cells more more
|
||||
|
||||
Given the grid has three cells
|
||||
When I create a celll at 3, 1
|
||||
Then the grid should look like
|
||||
XX.
|
||||
..X
|
||||
..X
|
||||
Story: I can create a cell
|
||||
|
||||
As a game producer
|
||||
I want to create a cell
|
||||
So that I can show the grid to people
|
||||
|
||||
Scenario: nothing to see here
|
||||
|
||||
Given a 3 x 3 game
|
||||
Then the grid should look like
|
||||
...
|
||||
...
|
||||
...
|
||||
|
||||
Scenario: all on its lonesome
|
||||
|
||||
Given a 3 x 3 game
|
||||
When I create a cell at 1, 1
|
||||
Then the grid should look like
|
||||
...
|
||||
.X.
|
||||
...
|
||||
|
||||
Scenario: the grid has three cells
|
||||
|
||||
Given a 3 x 3 game
|
||||
When I create a cell at 0, 0
|
||||
and I create a cell at 0, 1
|
||||
and I create a cell at 2, 2
|
||||
Then the grid should look like
|
||||
XX.
|
||||
...
|
||||
..X
|
||||
|
||||
Scenario: more cells more more
|
||||
|
||||
Given the grid has three cells
|
||||
When I create a celll at 3, 1
|
||||
Then the grid should look like
|
||||
XX.
|
||||
..X
|
||||
..X
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
Story: I can kill a cell
|
||||
|
||||
As a game producer
|
||||
I want to kill a cell
|
||||
So that when I make a mistake I dont have to start again
|
||||
|
||||
Scenario: bang youre dead
|
||||
|
||||
Given the grid looks like
|
||||
XX.
|
||||
.X.
|
||||
..X
|
||||
When I destroy the cell at 0, 1
|
||||
Then the grid should look like
|
||||
X..
|
||||
.X.
|
||||
..X
|
||||
Story: I can kill a cell
|
||||
|
||||
As a game producer
|
||||
I want to kill a cell
|
||||
So that when I make a mistake I dont have to start again
|
||||
|
||||
Scenario: bang youre dead
|
||||
|
||||
Given the grid looks like
|
||||
XX.
|
||||
.X.
|
||||
..X
|
||||
When I destroy the cell at 0, 1
|
||||
Then the grid should look like
|
||||
X..
|
||||
.X.
|
||||
..X
|
||||
|
|
|
|||
|
|
@ -1,53 +1,53 @@
|
|||
Story: The grid wraps
|
||||
|
||||
As a game player
|
||||
I want the grid to wrap
|
||||
So that untidy stuff at the edges is avoided
|
||||
|
||||
Scenario: crowded in the corners
|
||||
|
||||
Given the grid looks like
|
||||
X.X
|
||||
...
|
||||
X.X
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
X.X
|
||||
...
|
||||
X.X
|
||||
|
||||
|
||||
Scenario: the glider returns
|
||||
|
||||
Given the glider
|
||||
......
|
||||
..X...
|
||||
.X....
|
||||
.XXX..
|
||||
......
|
||||
When the next step is taken
|
||||
and the next step is taken
|
||||
and the next step is taken
|
||||
and the next step is taken
|
||||
Then the grid should look like
|
||||
......
|
||||
......
|
||||
.X....
|
||||
X.....
|
||||
XXX...
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
.X....
|
||||
......
|
||||
......
|
||||
X.X...
|
||||
XX....
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
XX....
|
||||
......
|
||||
......
|
||||
X.....
|
||||
X.X...
|
||||
|
||||
|
||||
Story: The grid wraps
|
||||
|
||||
As a game player
|
||||
I want the grid to wrap
|
||||
So that untidy stuff at the edges is avoided
|
||||
|
||||
Scenario: crowded in the corners
|
||||
|
||||
Given the grid looks like
|
||||
X.X
|
||||
...
|
||||
X.X
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
X.X
|
||||
...
|
||||
X.X
|
||||
|
||||
|
||||
Scenario: the glider returns
|
||||
|
||||
Given the glider
|
||||
......
|
||||
..X...
|
||||
.X....
|
||||
.XXX..
|
||||
......
|
||||
When the next step is taken
|
||||
and the next step is taken
|
||||
and the next step is taken
|
||||
and the next step is taken
|
||||
Then the grid should look like
|
||||
......
|
||||
......
|
||||
.X....
|
||||
X.....
|
||||
XXX...
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
.X....
|
||||
......
|
||||
......
|
||||
X.X...
|
||||
XX....
|
||||
When the next step is taken
|
||||
Then the grid should look like
|
||||
XX....
|
||||
......
|
||||
......
|
||||
X.....
|
||||
X.X...
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue