From 479ead28727d457afa16491a7a05b60859a82ae3 Mon Sep 17 00:00:00 2001 From: Sayth Date: Tue, 14 Jun 2016 22:45:49 +1000 Subject: [PATCH] Update hello_spec.rb To implement the new expect feature in rpsec and remove the overly verbose deprecation warnings that make it hard to read the actual errors. PS I am new to this but worked for me based off http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ --- learn_ruby/hello/hello_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/learn_ruby/hello/hello_spec.rb b/learn_ruby/hello/hello_spec.rb index 3ffd5cc..6d6763b 100644 --- a/learn_ruby/hello/hello_spec.rb +++ b/learn_ruby/hello/hello_spec.rb @@ -117,16 +117,16 @@ describe "the hello function" do it "says hello" do - hello.should == "Hello!" + expect(hello) == "Hello!" end end describe "the greet function" do it "says hello to someone" do - greet("Alice").should == "Hello, Alice!" + expect(greet("Alice")) == "Hello, Alice!" end it "says hello to someone else" do - greet("Bob").should == "Hello, Bob!" + expect(greet("Bob")) == "Hello, Bob!" end end