Skip to content

Commit

Permalink
Merge branch 'main' into week3_assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikeshj committed Jan 11, 2023
2 parents ae786d7 + 231ad31 commit 28e54c7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ capybara-*.html
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-[0-9]*
**/db/*.sqlite3
**/db/*.sqlite3-journal
**/db/*.sqlite3-[0-9]*
/public/system
/coverage/
/spec/tmp
Expand Down Expand Up @@ -51,4 +54,7 @@ yarn-debug.log*


**/imp.rb
**/p_imp.rb
**/p_imp.rb

**/log/*
**/tmp/*
16 changes: 16 additions & 0 deletions week_3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,20 @@ The routes file specifies the URLs that are recognized by the application.

- You should be able to see see your changes at `http://localhost:3000` and
`http://localhost:3000/about_me`.

![image](https://user-images.githubusercontent.com/66632353/211770375-4cc14806-7e60-4135-9e40-7b73e3c4ed23.png)
![image](https://user-images.githubusercontent.com/66632353/211770741-56dfaea8-2095-474b-974a-2b151953a3de.png)

- Copy the test file from week_3 directory to hello_world/test/controllers:
```bash
cp page_controller_test.rb hello_world/test/controllers
```

- Execute the test suite to ensure the page works as expected.

```bash
rails test
```
- If the test fails, check the view files and debug the application.

- Once the test works locally, submit your changes.
15 changes: 15 additions & 0 deletions week_3/page_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require "test_helper"

class PageControllerTest < ActionDispatch::IntegrationTest
test "should get root" do
get '/'
assert_response :success

assert_select "h1", "Hello, World!"
end

test "should get about_me" do
get "/about_me"
assert_response :success
end
end

0 comments on commit 28e54c7

Please sign in to comment.