diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4c209dde8f..1550805ebc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ # Your name -Please write your full name here to make it easier to find your pull request. +Hibaq Obsiye # User stories @@ -8,10 +8,7 @@ Please list which user stories you've implemented (delete the ones that don't ap - [ ] User story 1: "I want to instruct a plane to land at an airport" - [ ] User story 2: "I want to instruct a plane to take off from an airport and confirm that it is no longer in the airport" -- [ ] User story 3: "I want to prevent landing when the airport is full" -- [ ] User story 4: "I would like a default airport capacity that can be overridden as appropriate" -- [ ] User story 5: "I want to prevent takeoff when weather is stormy" -- [ ] User story 6: "I want to prevent landing when weather is stormy" + # README checklist diff --git a/lib/airplane.rb b/lib/airplane.rb new file mode 100644 index 0000000000..677d204748 --- /dev/null +++ b/lib/airplane.rb @@ -0,0 +1,5 @@ +class Airplane + + + +end \ No newline at end of file diff --git a/lib/airport.rb b/lib/airport.rb new file mode 100644 index 0000000000..9ffb14552c --- /dev/null +++ b/lib/airport.rb @@ -0,0 +1,17 @@ +require_relative 'airplane' + +class Airport + def initialize + @garage = [] + end + def land_plane(airplane) + @garage << airplane + end + + def take_off(airplane) + @garage.delete(airplane) + + end + + +end diff --git a/spec/airplane_spec.rb b/spec/airplane_spec.rb new file mode 100644 index 0000000000..15ac460c19 --- /dev/null +++ b/spec/airplane_spec.rb @@ -0,0 +1,7 @@ +require './lib/airplane' + +describe "taken_off" do + it " responds to " + + +end \ No newline at end of file diff --git a/spec/airport_spec.rb b/spec/airport_spec.rb new file mode 100644 index 0000000000..1e892003b4 --- /dev/null +++ b/spec/airport_spec.rb @@ -0,0 +1,32 @@ +require './lib/airport' +describe Airport do + + # I want it to respond to my method land plane + it 'responds to land plane ' do + airport= Airport.new + expect(airport).to respond_to(:land_plane) + end + + #I want land_plane to respond to 1 argument + it { is_expected.to respond_to(:land_plane).with(1).argument } + + # I want it to land a plane + it "lands a plane" do + airplane = Airplane.new + expect(airport.land_plane(airplane)).to eq(airplane) + end + + # I want it to respond to my take_off method: + it 'responds to take off ' do + airport = Airport.new + expect(airport).to respond_to(:take_off) + + end + # I want take_off to respond to 1 argument + it { is_expected.to respond_to(:take_off).with(1).argument } + + + + + +end \ No newline at end of file