aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-04-30 16:09:10 +0100
committerLouise Crow <louise.crow@gmail.com>2013-04-30 16:09:10 +0100
commita8f925a87075c8cc36d3ed29f7f64f51bc820b1e (patch)
tree60999ee59f9bc20a849a74bef553271718f32596 /spec/controllers/general_controller_spec.rb
parent6124624f4035e74eb79f1e93f26d5584ed3e2fa1 (diff)
Remove debian-specific require clause and use Gemfile to specify non-standard require - bundler should be supplying the gem now.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 9a88dbc3a..4a1c8b134 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -19,8 +19,11 @@ end
describe GeneralController, 'when getting the blog feed' do
- it 'should add a lang param correctly to a url with no querystring' do
+ before do
AlaveteliConfiguration.stub!(:blog_feed).and_return("http://blog.example.com")
+ end
+
+ it 'should add a lang param correctly to a url with no querystring' do
get :blog
assigns[:feed_url].should == "http://blog.example.com?lang=en"
end
@@ -31,6 +34,12 @@ describe GeneralController, 'when getting the blog feed' do
assigns[:feed_url].should == "http://blog.example.com?alt=rss&lang=en"
end
+ it 'should parse an item from an example feed' do
+ controller.stub!(:quietly_try_to_open).and_return(load_file_fixture("blog_feed.atom"))
+ get :blog
+ assigns[:blog_items].count.should == 1
+ end
+
end
describe GeneralController, "when showing the frontpage" do