読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

hello world

RSpec

spec/greeter_spec.rb

class RSpecGreeter
  def greet
    "Hello Rspec!"
  end
end

describe "RSpec Greeter" do
  it "should say 'Hello Rspec!' when it receives the greet() message" do
    greeter = RSpecGreeter.new
    greeting = greeter.greet
    greeting.should == "Hello Rspec!"
  end
end
rspec greeter_spec.rb