spec/integration/view/context/request_spec.rb in hanami-2.0.3 vs spec/integration/view/context/request_spec.rb in hanami-2.1.0.beta1
- old
+ new
@@ -18,18 +18,14 @@
end
let(:context_class) { TestApp::Views::Context }
subject(:context) {
- context_class.new(
- request: request,
- response: response,
- )
+ context_class.new(request: request)
}
let(:request) { double(:request) }
- let(:response) { double(:response) }
describe "#request" do
it "is the provided request" do
expect(context.request).to be request
end
@@ -49,13 +45,13 @@
describe "#flash" do
let(:flash) { double(:flash) }
before do
- allow(response).to receive(:flash) { flash }
+ allow(request).to receive(:flash) { flash }
end
- it "is the response's flash" do
+ it "is the request's flash" do
expect(context.flash).to be flash
end
end
end