-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added third test stub, some production code about subscribing ad and …
…test suite
- Loading branch information
Showing
6 changed files
with
47 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
task default: %w[test] | ||
|
||
task :test do | ||
ruby "./test/smoke_test.rb" | ||
ruby "./test/all_tests.rb" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
class ItPeople | ||
|
||
attr_accessor :telephone_number | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
|
||
class Media | ||
|
||
attr_accessor :categories | ||
|
||
def add_advertising telephone_number | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require "test-unit" | ||
require "./src/Client.rb" | ||
require "./src/ItPeople.rb" | ||
require "./src/Media.rb" | ||
|
||
class ActorsTestClass < Test::Unit::TestCase | ||
|
||
def setup | ||
|
||
@client = Client.new | ||
@it_people = ItPeople.new | ||
@media = Media.new | ||
|
||
end | ||
|
||
def test_if_there_are_actors_of_that_tragedy | ||
|
||
assert_not_nil(@client); | ||
assert_not_nil(@it_people); | ||
assert_not_nil(@media); | ||
|
||
end | ||
|
||
def test_if_it_possible_to_add_advertising | ||
|
||
@media.add_advertising(@it_people.telephone_number); | ||
|
||
end | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require 'test/unit/testsuite' | ||
require './test/smoke_test.rb' | ||
require './test/actors_tests.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
require "test-unit" | ||
require "./src/Client.rb" | ||
require "./src/ItPeople.rb" | ||
require "./src/Media.rb" | ||
|
||
class FirstSmokeTestClass < Test::Unit::TestCase | ||
|
||
|
||
def test_if_this_test_framework_works | ||
|
||
assert_equal(2, 1 + 1) | ||
|
||
end | ||
|
||
def test_if_there_are_actors_of_that_tragedy | ||
|
||
client = Client.new | ||
it_people = ItPeople.new | ||
media = Media.new | ||
|
||
assert_not_nil(client); | ||
assert_not_nil(it_people); | ||
assert_not_nil(media); | ||
|
||
end | ||
end |