This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "games/_square.html.erb" do | |
before(:each) do | |
@ttt = mock(TicTacToe) | |
end | |
it "displays a filled square" do | |
@ttt.stub!(:square_empty?).and_return false | |
@ttt.stub!(:get_square_value).and_return "X" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello_limelight mjansen$ rspec spec/activerecord_derby_spec.rb | |
-- create_table(:albums) | |
-> 2.6660s | |
-> 0 rows | |
-- create_table(:tracks) | |
-> 0.0260s | |
-> 0 rows | |
8 | |
10 | |
Sticky Fingers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("Todos Collection", function () { | |
it("uses the Todo model", function () { | |
var todos = new Todo.collections.Todos(); | |
expect(todos.model).toEqual(Todo.models.Todo); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace("Todo.models", { | |
Todo: Backbone.Model.extend({}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src_files: | |
- public/javascripts/vendor/namespace.js | |
- public/javascripts/vendor/jquery.js | |
- public/javascripts/vendor/underscore.js | |
- public/javascripts/vendor/backbone.js | |
- spec/javascripts/support/jasmine-jquery-1.3.1.js | |
- public/javascripts/application.js | |
- public/javascripts/**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src_files: | |
- public/javascripts/vendor/namespace.js | |
- public/javascripts/vendor/jquery.js | |
- public/javascripts/vendor/underscore.js | |
- public/javascripts/vendor/backbone.js | |
- spec/javascripts/support/jasmine-jquery-1.3.1.js | |
- public/javascripts/application.js | |
- public/javascripts/models/*.js //Include directories in specific order to avoid dependency problems | |
- public/javascripts/collections/*.js | |
- public/javascripts/**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace("Todo.collections", { | |
Todos : Backbone.Collection.extend({ | |
model: Todo.models.Todo | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("Todos Collection", function () { | |
beforeEach(function () { | |
this.todos = new Todo.collections.Todos(); | |
}); | |
it("uses the Todo model", function () { | |
expect(this.todos.model).toEqual(Todo.models.Todo); | |
}); | |
it("url is 'todos'", function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace("Todo.collections", { | |
Todos : Backbone.Collection.extend({ | |
model: Todo.models.Todo | |
url: "todos" | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Courtesy of http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning | |
Add to your .bash_profile: | |
export RUBY_HEAP_MIN_SLOTS=500000 | |
export RUBY_HEAP_SLOTS_INCREMENT=250000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=50000000 |