You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
748 B
Ruby
37 lines
748 B
Ruby
require 'spec_helper'
|
|
|
|
describe HomeController do
|
|
|
|
describe "GET 'show'" do
|
|
describe 'when there is at least one featured cast' do
|
|
before do
|
|
create(:asciicast, :featured => true)
|
|
end
|
|
|
|
it "returns http success" do
|
|
get 'show'
|
|
expect(response).to be_success
|
|
end
|
|
end
|
|
|
|
describe 'when there is no featured cast but any cast exists' do
|
|
before do
|
|
create(:asciicast, :featured => false)
|
|
end
|
|
|
|
it "returns http success" do
|
|
get 'show'
|
|
expect(response).to be_success
|
|
end
|
|
end
|
|
|
|
describe 'when there are no casts at all' do
|
|
it "returns http success" do
|
|
get 'show'
|
|
expect(response).to be_success
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|