changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/failing_examples/diffing_spec.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1describe "Running specs with --diff" do
2 it "should print diff of different strings" do
3 uk = <<-EOF
4RSpec is a
5behaviour driven development
6framework for Ruby
7EOF
8 usa = <<-EOF
9RSpec is a
10behavior driven development
11framework for Ruby
12EOF
13 usa.should == uk
14 end
15
16 class Animal
17 def initialize(name,species)
18 @name,@species = name,species
19 end
20
21 def inspect
22 <<-EOA
23<Animal
24name=#{@name},
25species=#{@species}
26>
27 EOA
28 end
29 end
30
31 it "should print diff of different objects' pretty representation" do
32 expected = Animal.new "bob", "giraffe"
33 actual = Animal.new "bob", "tortoise"
34 expected.should eql(actual)
35 end
36end