Skip to content

Instantly share code, notes, and snippets.

@benedikt
Created July 17, 2012 18:50
Show Gist options
  • Save benedikt/3131247 to your computer and use it in GitHub Desktop.
Save benedikt/3131247 to your computer and use it in GitHub Desktop.

Revisions

  1. benedikt created this gist Jul 17, 2012.
    17 changes: 17 additions & 0 deletions projects_controller_spec.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    require 'spec_helper'

    describe ProjectsController do

    let(:project) { double(:project) }
    let(:projects) { [project] }

    describe 'GET show' do
    let(:params) { { :id => 1, :format => :json } }

    before { Project.should_receive(:find).with(1).and_return(project) }

    it { should assign_to(:project).with(project) }
    it { should respond_with(project) }
    end

    end