Sha256: 53bcc1c36ca8954043c70b81dd452459aa5d942553f8c76fefd09c45c30219ff
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
require 'spec_helper' describe Konacha::SpecsController do before do @routes = Konacha::Engine.routes end describe "#iframe" do it "assigns the result of Spec.find_by_name to @spec" do Konacha::Spec.should_receive(:find_by_name).with("spec_name") { :spec } get :iframe, :name => "spec_name" assigns[:spec].should == :spec end it "404s if there is no match for the given path" do Konacha::Spec.should_receive(:find_by_name).with("array_spec") { raise Konacha::Spec::NotFound } get :iframe, :name => "array_spec" response.status.should == 404 response.should_not render_template("konacha/specs/iframe") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
konacha-2.2.0 | spec/controllers/specs_controller_spec.rb |
konacha-2.1.0 | spec/controllers/specs_controller_spec.rb |
konacha-2.0.0 | spec/controllers/specs_controller_spec.rb |