Sha256: 08900e0b05e41ac0adc69dd7ce605f616291eb8e0b6388c4a19fbc64ee544a40
Contents?: true
Size: 1.2 KB
Versions: 8
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' describe Konacha::SpecsController do before do @routes = Konacha::Engine.routes end describe '#parent' do it 'accepts a mode parameter and assigns it to @run_mode' do get :parent, :mode => 'runner' assigns[:run_mode].runner?.should be_truthy end it 'uses the Konacha.mode if no mode parameter is specified' do Konacha.stub(:mode => :konacha_mode) get :parent assigns[:run_mode].konacha_mode?.should be_truthy end 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 assigns[:stylesheets].should == Konacha::Engine.config.konacha.stylesheets assigns[:javascripts].should == Konacha::Engine.config.konacha.javascripts 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
8 entries across 8 versions & 1 rubygems