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
<?php | |
namespace FsckUnit; | |
require_once(dirname(__FILE__) . "/spec_helper.php"); | |
describe("ActiveRecord::Base::table_name()", function() { | |
it("returns the table name for the class", function() { | |
expect(::News::table_name())->to("==", "news"); | |
expect(::Post::table_name())->to("==", "posts"); |
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
ActiveSupport::ArrayExtensions::flatten() | |
- should correctly flatten the passed multi-dimensional arrays down to a single-dimensional array | |
- should correctly flatten associative arrays | |
ActiveSupport::ArrayExtensions::first() | |
- should return the first item of the passed array | |
ActiveSupport::ArrayExtensions::last() | |
- should return the last item of the passed array | |
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
ActiveSupport::ArrayExtensions::flatten() | |
- should correctly flatten the passed multi-dimensional array down to a single-dimensional array | |
- should correctly flatten associative arrays | |
ActiveSupport::ArrayExtensions::first() | |
- should return the first item of the passed array | |
ActiveSupport::ArrayExtensions::last() | |
- should return the last item of the passed array | |
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
<?php | |
namespace FsckUnit; | |
class Bowling | |
{ | |
public $score = 0; | |
public function hit() | |
{ |
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
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu dünn\n-oder genau richtig sind." | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp | |
puts "Geben sie bitte ihre Groese in >>METERN<< ein." | |
@groese = gets.chomp | |
puts "#{@name}, sie sind #{@groese} Groß und wiegen #{@gewicht}.\n Ist das richtig?\n" |
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
class BMIRechner | |
def initialize() | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
self.hallo() | |
end | |
def hallo |
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
class BmiRechner | |
def name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp |
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
class BmiRechner | |
def name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp |
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
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
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
class Auto | |
def set_farbe(farbe) | |
@farbe = farbe | |
end | |
def farbe | |
@farbe | |
end | |
def beschreibung |
OlderNewer