Commit e7e7670b0ddfe112d1f7d900a6ac48afcfafbdea
1 parent
1c268e70
Exists in
master
and in
1 other branch
Move the spec about apps/show.atom.builder in his own spec
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
spec/controllers/apps_controller_spec.rb
@@ -52,7 +52,6 @@ describe AppsController do | @@ -52,7 +52,6 @@ describe AppsController do | ||
52 | it "should list atom feed successfully" do | 52 | it "should list atom feed successfully" do |
53 | get :show, :id => @app.id, :format => "atom" | 53 | get :show, :id => @app.id, :format => "atom" |
54 | response.should be_success | 54 | response.should be_success |
55 | - response.body.should match(@problem.message) | ||
56 | end | 55 | end |
57 | 56 | ||
58 | context "pagination" do | 57 | context "pagination" do |
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +require 'spec_helper' | ||
2 | + | ||
3 | +describe "apps/show.atom.builder" do | ||
4 | + let(:app) { stub_model(App) } | ||
5 | + let(:problems) { [ | ||
6 | + stub_model(Problem, :message => 'foo', :app => app) | ||
7 | + ]} | ||
8 | + | ||
9 | + before do | ||
10 | + view.stub(:app).and_return(app) | ||
11 | + view.stub(:problems).and_return(problems) | ||
12 | + end | ||
13 | + | ||
14 | + context "with errs" do | ||
15 | + it 'see the errs message' do | ||
16 | + render | ||
17 | + expect(rendered).to match(problems.first.message) | ||
18 | + end | ||
19 | + end | ||
20 | + | ||
21 | +end |