Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (31 sloc) 1.04 KB
require "spec_helper"
module RSpec::Rails
describe RequestExampleGroup do
it { should be_included_in_files_in('./spec/requests/') }
it { should be_included_in_files_in('./spec/integration/') }
it { should be_included_in_files_in('.\\spec\\requests\\') }
it { should be_included_in_files_in('.\\spec\\integration\\') }
it "adds :type => :request to the metadata" do
group = RSpec::Core::ExampleGroup.describe do
include RequestExampleGroup
end
group.metadata[:type].should eq(:request)
end
describe "#app" do
before do
@orig_application = RSpec.configuration.application
RSpec.configuration.application = RSpec::EngineExample
end
after do
RSpec.configuration.application = @orig_application
end
it "sets app as custom application" do
group = RSpec::Core::ExampleGroup.describe do
include RequestExampleGroup
end
example = group.new
example.app.should eq(RSpec::EngineExample)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.