<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Ruby-Web-Sessions-Exercise/test, branch solution</title>
<subtitle>An exercise that demonstrates how to leverage server-side web sessions for authentication</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/'/>
<entry>
<title>Add logged_in.erb template</title>
<updated>2015-12-08T06:29:47+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=8513c8d87e21ab477a438962bac8ad63c8987789'/>
<id>8513c8d87e21ab477a438962bac8ad63c8987789</id>
<content type='text'>
Template that displays when the user is logged in.

Adjust the login test to check for the text in this template.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Template that displays when the user is logged in.

Adjust the login test to check for the text in this template.
</pre>
</div>
</content>
</entry>
<entry>
<title>auth_test.rb: Add logout test</title>
<updated>2015-12-08T06:22:02+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=61e3141fb526e6a967e9eee01de4fae474b4e9cc'/>
<id>61e3141fb526e6a967e9eee01de4fae474b4e9cc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>auth_test.rb: Create login helpers</title>
<updated>2015-12-08T06:17:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=6eef2d15e7935dc21580dd7c9e4042d3b8564b4d'/>
<id>6eef2d15e7935dc21580dd7c9e4042d3b8564b4d</id>
<content type='text'>
Create a couple new methods to extract login functionality and remove
duplicate test code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a couple new methods to extract login functionality and remove
duplicate test code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for unrecognised user</title>
<updated>2015-12-08T06:10:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:10:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=cb06860fa4cd9083eb84929a70353ebe7c7cea18'/>
<id>cb06860fa4cd9083eb84929a70353ebe7c7cea18</id>
<content type='text'>
When logging in with unrecognised credentials, the response should
include "Unrecognized user".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When logging in with unrecognised credentials, the response should
include "Unrecognized user".
</pre>
</div>
</content>
</entry>
<entry>
<title>app.rb: Remove Sinatra::Base application wrapper</title>
<updated>2015-12-08T05:28:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=28770a5143bb5b48389d5ad4ce235625c12f1056'/>
<id>28770a5143bb5b48389d5ad4ce235625c12f1056</id>
<content type='text'>
Don't wrap our routes/controllers in a `Sinatra::Base` class to keep
things simple. Was doing this because I thought I needed to in order to
be able to tell Capybara where the application was but looking at the
Sinatra testing page (http://www.sinatrarb.com/testing.html), they
provide an example for Capybara that details this
`Sinatra::Application.new` call that I can make instead. This frees us
up to use the simplified application definition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't wrap our routes/controllers in a `Sinatra::Base` class to keep
things simple. Was doing this because I thought I needed to in order to
be able to tell Capybara where the application was but looking at the
Sinatra testing page (http://www.sinatrarb.com/testing.html), they
provide an example for Capybara that details this
`Sinatra::Application.new` call that I can make instead. This frees us
up to use the simplified application definition.
</pre>
</div>
</content>
</entry>
<entry>
<title>test_helper: Set `RACK_ENV` = 'test'</title>
<updated>2015-12-08T05:23:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=f2950ce4afa0cf07f2f23a82805e20ab5857db63'/>
<id>f2950ce4afa0cf07f2f23a82805e20ab5857db63</id>
<content type='text'>
Saw this on the Sinatra testing page
(http://www.sinatrarb.com/testing.html). Seems like I should put it in
to be a good Rack citizen.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Saw this on the Sinatra testing page
(http://www.sinatrarb.com/testing.html). Seems like I should put it in
to be a good Rack citizen.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test that fills in login form</title>
<updated>2015-12-08T05:18:16+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=22fe7b928b47cbbce4678e1e16311a2cd16088b8'/>
<id>22fe7b928b47cbbce4678e1e16311a2cd16088b8</id>
<content type='text'>
* Write a `setup` method to extract the '/' route visit
* Change the logic of `test_index_has_login_form` to check for the
  presence of 'Login' text and a form (super basic)
* Create a new test that fills in the login form and clicks the "Login"
  button. For now just checks that we get a successful response.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Write a `setup` method to extract the '/' route visit
* Change the logic of `test_index_has_login_form` to check for the
  presence of 'Login' text and a form (super basic)
* Create a new test that fills in the login form and clicks the "Login"
  button. For now just checks that we get a successful response.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a simple Capybara test</title>
<updated>2015-12-08T04:36:30+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T04:36:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=67d985ed3047fe9e73b2038a81d96876ab54b63a'/>
<id>67d985ed3047fe9e73b2038a81d96876ab54b63a</id>
<content type='text'>
* Add Rakefile to run tests with `rake`
* Add a `test_helper` to take care of the setup that Capybara requires
  in order to run
* Add a super basic test to see if Capybara works
* Put app in a `Sinatra::Base` subclass so that we can tell Capybara
  where to find it
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add Rakefile to run tests with `rake`
* Add a `test_helper` to take care of the setup that Capybara requires
  in order to run
* Add a super basic test to see if Capybara works
* Put app in a `Sinatra::Base` subclass so that we can tell Capybara
  where to find it
</pre>
</div>
</content>
</entry>
</feed>
