Sha256: d5a4953186c168991d334866f1c50175385a6f75c08461ed9fa555d4e60f6c66

Contents?: true

Size: 795 Bytes

Versions: 4

Compression:

Stored size: 795 Bytes

Contents

require "spec_helper"

describe "render_template" do
  context "given a hash" do
    it "delegates to assert_template" do
      self.should_receive(:assert_template).with({:this => "hash"}, "this message")
      "response".should render_template({:this => "hash"}, "this message")
    end
  end

  context "given a string" do
    it "delegates to assert_template" do
      self.should_receive(:assert_template).with("this string", "this message")
      "response".should render_template("this string", "this message")
    end
  end

  context "given a string" do
    it "converts to_s and delegates to assert_template" do
      self.should_receive(:assert_template).with("template_name", "this message")
      "response".should render_template(:template_name, "this message")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.beta.11 spec/rspec/rails/matchers/render_template_spec.rb
rspec-rails-2.0.0.beta.10 spec/rspec/rails/matchers/render_template_spec.rb
rspec-rails-2.0.0.beta.9.1 spec/rspec/rails/matchers/render_template_spec.rb
rspec-rails-2.0.0.beta.8 spec/rspec/rails/matchers/render_template_spec.rb