On 2 November 2015 at 16:37, James Harold <[email protected]> wrote:
>
>
> On Monday, November 2, 2015 at 10:33:32 AM UTC-6, James Harold wrote:
>>
>>
>>
>> On Monday, November 2, 2015 at 10:18:01 AM UTC-6, Colin Law wrote:
>>>
>>> On 2 November 2015 at 16:01, James Harold <[email protected]> wrote:
>>> >
>>> > BTW, the error is listed here:
>>> >
>>> > 1) Failure:
>>> > StaticPagesControllerTest#test_should_get_about
>>> >
>>> > [C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:19]:
>>> > <About | Ruby on Rails Tutorial Sample App> expected but was
>>> > <About | Ruby on Rails Tutorial Sample App.>.
>>>
>>> The test producing that is
>>>   test "should get about" do
>>>     get :about
>>>     assert_response :success
>>>     assert_select "title", "About | Ruby on Rails Tutorial Sample App"
>>>   end
>>>
>>> What do you think that error is trying to tell you?
>>>
>>> Colin
>>
>>
>>
>> It tells the program to perform the GET function for the HTML page, keep
>> running the page when success is returned upon matching, and then select the
>> page desired by the programmer and display it on the screen. I have also
>> worked on the program, and have narrowed it down to two failure errors. They
>> are listed here:
>>
>> 1) Failure:
>> StaticPagesControllerTest#test_should_get_about
>> [C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:19]:
>> <About | Ruby on Rails Tutorial Sample App> expected but was
>> <Ruby on Rails Tutorial Sample App.>.
>> Expected 0 to be >= 1.
>>
>>
>>   2) Failure:
>> StaticPagesControllerTest#test_should_get_help
>> [C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:13]:
>> <Help | Ruby on Rails Tutorial Sample App> expected but was
>> <Ruby on Rails Tutorial Sample App.>.
>> Expected 0 to be >= 1.
>>
>>  What should I do next? How do I fix this?
>
>
>
> Also, here is the new test file:
>
> class StaticPagesControllerTest < ActionController::TestCase
>   test "should get home" do
>     get :home
>     assert_response :success
>     assert_select "title", "Ruby on Rails Tutorial Sample App."
>   end
>
>   test "should get help" do
>     get :help
>     assert_response :success
>     assert_select "title", "Help | Ruby on Rails Tutorial Sample App."
>   end
>
>   test "should get about" do
>     get :about
>     assert_response :success
>     assert_select "title", "About | Ruby on Rails Tutorial Sample App."
>   end
>
>   test "should get contact" do
>     get :contact
>     assert_response :success
>     assert_select "title", "Contact | Ruby on Rails Tutorial Sample App."
>   end
> end

As I have asked previously, what do you think is meant by
<About | Ruby on Rails Tutorial Sample App> expected but was
<Ruby on Rails Tutorial Sample App.>.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuEGxLfAgOnrnOVArw6DOFFs%2Bt9An8obFU5%2Bru%3DumfsiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to