In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",| -> % vagrant status | |
| /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/driver/virtualbox.rb:26:in `initialize': wrong number of arguments (0 for 1) (ArgumentError) | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/vm.rb:136:in `new' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/vm.rb:136:in `rescue in reload!' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/vm.rb:128:in `reload!' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/vm.rb:35:in `initialize' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/environment.rb:430:in `new' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/environment.rb:430:in `block in load_vms!' | |
| from /home/tyler/.rvm/gems/ruby-1.9.3-p0@infra-puppet/gems/vagrant-1.0.0/lib/vagrant/environme |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| function assertViewAction(viewClass, eventCallbackName, elementAccessorName, eventName, viewReference) { | |
| it("should run the " + eventCallbackName + " action when the " + elementAccessorName + " gets a " + eventName + " event (assertViewAction)", function() { | |
| var isPrototypal = eventCallbackName in viewClass.prototype; | |
| if (isPrototypal) { | |
| spyOn(viewClass.prototype, eventCallbackName); | |
| } | |
| var view = viewReference(); | |
| if (!isPrototypal) { | |
| spyOn(view, eventCallbackName); | |
| } |
| require 'test_helper' | |
| require 'minitest/autorun' | |
| module Tenderlove | |
| class Spec < MiniTest::Spec | |
| include ActiveSupport::Testing::SetupAndTeardown | |
| include ActiveRecord::TestFixtures | |
| alias :method_name :__name__ if defined? :__name__ | |
| self.fixture_path = File.join(Rails.root, 'test', 'fixtures') |
| This example shows how to setup an environment running Rails 3 under 1.9.2 with a 'rails3' gem set. | |
| ∴ rvm update --head | |
| # ((Open a new shell)) or do 'rvm reload' | |
| # If you do not already have the ruby interpreter installed, install it: | |
| ∴ rvm install 1.9.2 | |
| # Switch to 1.9.2-head and gemset rails3, create if it doesn't exist. | |
| ∴ rvm --create use 1.9.2@rails3 |