Sha256: bc976a2ea9edcc7af601d1586cac21d222a7a75facd479bc04d8742a4402dd2f
Contents?: true
Size: 659 Bytes
Versions: 20
Compression:
Stored size: 659 Bytes
Contents
require 'spec_helper' describe Konacha::SpecsController do before do @routes = Konacha::Engine.routes end describe "#specs" do it "assigns the result of Spec.find to @specs" do Konacha::Spec.should_receive(:find).with("spec_path") { :spec } get :specs, :path => "spec_path" assigns[:specs].should == :spec end it "404s if there is no match for the given path" do Konacha::Spec.should_receive(:find).with("array_spec") { raise Konacha::Spec::NotFound } get :specs, :path => "array_spec" response.status.should == 404 response.should_not render_template("konacha/specs/show") end end end
Version data entries
20 entries across 20 versions & 1 rubygems