Sha256: cc6f27dea706fc5bfd177876c9e31c977c8810d3b99437adfcdca043dd37f11e

Contents?: true

Size: 468 Bytes

Versions: 4

Compression:

Stored size: 468 Bytes

Contents

require 'spec_helper'

module ApiTaster
  describe RoutesController do
    it "#index" do
      get :index, :use_route => :api_taster

      assigns(:routes).should be_kind_of(Hash)
    end

    it "#show" do
      Route.stub(:find).and_return(Route.new)
      Route.stub(:inputs_for).and_return([])

      get :show, :id => 1, :use_route => :api_taster

      assigns(:route).should be_kind_of(Route)
      assigns(:inputs).should be_kind_of(Array)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
api_taster-0.2.2 spec/controllers/api_taster/routes_controller_spec.rb
api_taster-0.2.1 spec/controllers/api_taster/routes_controller_spec.rb
api_taster-0.2.0 spec/controllers/api_taster/routes_controller_spec.rb
api_taster-0.1.0 spec/controllers/api_taster/routes_controller_spec.rb