Ruby on Rails 4---A Test-Driven Approach

Go from a Rails novice to intermediate with confidence and land a job as a developer. Write code the way the pros do it.
4.2 (43 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,401 students enrolled
$100
Take This Course
  • Lectures 122
  • Contents Video: 19 hours
    Other: 6 mins
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2015 English

Course Description

*** Revisions with Rails 4.2 and RSpec 3 coming soon ***

This course teaches students how to write tests and use those tests to drive the development of Ruby on Rails applications (Test-Driven development or TDD). In the process, an electronic commerce (e-commerce) application in the form of an online bookstore will be developed to demonstrate many concepts in Rails.

This course is for anybody who has played around with Ruby on Rails but does not know how to do TDD. It is also ideal for people transitioning from other languages/frameworks. If you can write "Hello World" in Rails, you can take this course. Students should take this course to learn the valuable skill of TDD and move into the realm of professional software development.

Test first development is a valuable skill that is required in the software development field. Even if you don't intend to become a professional programmer, the knowledge gained will make you a better programmer.

Many introductory courses in Rails do not teach TDD. That is unfortunate because TDD is not all that difficult and the earlier one learns it the better. By taking this course, you will be well equipped to develop applications backed by tests.

The course is project based and for this reason, students have to get their hands dirty and do all the practice exercises mentioned in the videos. The course covers writing authentication machinery from scratch, basic authorization, sending emails from the application. It also covers how to use secure random tokens to make the application more secure.

Email and secure random token are used to craft a password resetting machinery to help users reset their passwords in a secure manner. Students will learn how to integrate credit card processing into their application and charge the customers.

Students will also learn how to handle one-to-many and many-to-many relationships and, in the process learn how to handle nested-forms in Rails.

Students who take this course will be well equipped to develop rock solid web applications in Rails. The course is over thirteen (13) hours long and it can take between two weeks and a month to complete depending on the student's learning style.

What are the requirements?

  • Students don't have to do anything before they start the course. However, for those completely new to Rails, it will be good to go through some basic Rails tutorials first before starting this course.

What am I going to get from this course?

  • Do Test-Driven Development in Ruby on Rails, write e-commerce applications, do credit card processing and send emails from their Rails applications

What is the target audience?

  • Anybody who knows how Ruby on Rails works but does not know who to do test-driven development. It is also ideal for people transitioning from other frameworks to Rails.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
Course Introduction
Preview
02:59
The Finished Application
Preview
01:54
00:52

Description of the split of the two parts of the course

01:48

Overview and explanation of developing locally vs. using cloud9 IDE

05:51

Install ruby locally on a mac

02:31

Installation of Rails in local development environment

03:10

Installing and using git for version control

03:59

Sign up for cloud based development environment

08:55

Getting familiar with cloud9 environment

02:01

Getting familiar with directory tree of cloud9

01:10

Installing Ruby on Rails in cloud IDE

Section 2: Introduction to testing
02:03

Model View Controller structure of Rails Applications

01:56

Unit, Functional and Integration tests explained

03:28

Create a new Rails application in local env

11:03

Adding gems necessary to setup automated testing environment

Article

Code for the Guardfile used in Minitest

08:47

Using ruby version manager and other unix processes

06:25

Write the first test for index action

06:32

Build the feature to pass the test

Section 3: Setup with code repositories and production deploy
00:28

Introducing items covered in section 3

02:41

Sign up for online code repository

04:46

Push repository to bitbucket to save work

10:11

Sign up for an account with Heroku and deploy code to production

Section 4: Learn unit testing to build models using TDD
01:00

Section 4 introduction of material covered

19:31

Part 1 of 2 in example of spec and test creation for a model

19:21

Completion of unit test example 1

08:53

2nd example of model with unit tests, part 1 of 2

18:47

Unit test example model 2, part 2 of 2 with valid email regex and validations

00:17

Wrapping up section 4

Section 5: Implement TDD for model and wrap up unit testing
13:07

Write spec and tests for creating article model

11:49

Complete articles model by creating and passing tests

00:33

Use TDD to create users

00:20

Conclusion of part 1 of course using minitest

Section 6: Setup of Development Environment and Writing Model Specs
Installing Ruby and Rails
14:33
Setting up a Github Account
01:38
Complete Application Files
09:47
Creating a New Rails Project
Preview
12:05
Test-Driven Development
03:32
Installing and Setting Up RSpec and Capybara
Preview
11:04
Author Model Specs --- Adding Fabrication Gem
Preview
17:25
Author Model Specs -- Implementation and Validation
12:51
Section 7: Writing Authors Controller Specs
Specs for the 'index' and 'show' actions
19:59
Specs for the 'new' action
15:36
Styling Author New Form
06:41
Specs for the 'create' action --- Successful Path
Preview
14:30
Specs for the 'create' action --- Unsuccessful Path
09:57
Specs for the 'edit' and 'update' actions---Successful path
17:49
Specs for the 'edit' and 'update' actions---Unsuccessful path
06:10
Specs for the 'delete' action
Preview
16:04
Section 8: Creating Publisher
Creating Publisher Model and Introducing Shoulda Matchers
14:15
Section 9: Relationship between entitities
Dealing with One-to-Many Relationship Between Publisher and Book
05:30
Dealing with Many-to-Many Relationship Between Author and Book
08:36
Section 10: Writing Feature Tests
"Creating Author" Feature Test---Successful Path
Preview
16:37
"Creating Author" Feature Test---Failure Path
06:59
Section 11: Creating the Book Model and Controller
Creating the Book Model
16:06
Exercise: Implementing the Book Controller given controller specs
02:01
Exercise files
Article
Exercise solution
Article
Section 12: Revisiting the Many-to-Many Relationship: Has-Many Through
Adding has_many :through Relationships to Book and Author Models
15:36
Creating the Book Feature Test---Writing the Test
11:36
Creating the Book Feature Test---Writing the View Template
17:54
Using jQuery UI Datepicker to Simplify Date Entry
08:56
Section 13: File uploading
Adding File Field to Form
06:38
Setting Up Dropbox for File Upload
12:47
Setting Up Carrierwave
10:35
Seeding Data In Rails
14:36
Section 14: User Signup
Introducing The Mechanics of Signing Up
01:03
Creating the User Model---Writing the Model Specs
Preview
12:41
Creating the User Model---Validating the Attributes
12:22
Exercise: Implementing the Users Controller
01:13
Writing the "Creating User" Feature Test
11:44
Introducing Regular Expression (Regex)
09:06
Validating the Format of the Email Field
07:00
Exercise: Implementing the "Showing User" Profile
01:30
User Show View Template
Article
Solution to Showing User Profile Implementation
Article
Section 15: Authentication from scratch
Signing in---Creating the Sessions Controller Specs
11:18
Signing in---Implementing the 'new' and 'create' Actions
13:40
Signing in---Signing in Feature Test and Implementation
06:30
Signing in---Refactoring the 'create' Action Code
15:31
Signing Out
09:19
Section 16: Basic Access Control
Adding an Admin Field
06:21
Restricting Access To Guest Users
19:09
Restricting Access To Non-Admin Users and Introduction to Shared Examples
19:55

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Mashrur Hossain, Technology Professional and Entrepreneur

Hi, I'm Mashrur, I have been a technology professional for over a decade and have degrees in Computer Science and Economics

I have worked with Enterprise Software Systems throughout my career with roles played in analysis, development and management. I lead projects using both agile and waterfall methodologies and am well versed in the inner workings of the software development and delivery world.

During my career, I've realized how much I enjoyed training new hires and new team members and helping them succeed. I've dedicated a good amount of time over the last 7 years on-boarding new analysts and developers and working with them to build and maintain systems which puts me in a very unique position of knowing what new entrants to a field or subject need to succeed. I strongly believe in a focus on fundamentals and practice and not in shortcuts or gimmicks.

I'm very passionate about web application development and I prototype and build web apps in entrepreneurial pursuits. Ruby on Rails has proven to be a very strong force in this field and is especially powerful for startups looking to prototype ideas rapidly and subsequently building on that platform as the ideas catch on.

So join me for my comprehensive Ruby on Rails Developer courses as I guide you through the world of web application development using Rails and bringing your ideas to life.

Instructor Biography

Emmanuel Asante, Mining Software Developer and Freelancer

I studied mining engineering and information systems. I completed a Diploma in Datametrics at the University of South Africa with a specialization in Information Systems.

Whilst working in the mines, I developed various mining, rock mechanics and geological applications using languages ranging from Perl, Turbo Pascal to C#, Java and Ruby. In particular, I developed a mining production information management system, as well as a pit crew performance management system, both for Thompson Creek Metals (Endako Mines), and a client management application for Snowden Mining Industry Consultants, using Ruby on Rails. I currently do freelance web development in Ruby on Rails.

Ready to start learning?
Take This Course