spec/temp_spec.rb in fossil-0.5.47 vs spec/temp_spec.rb in fossil-0.5.48
- old
+ new
@@ -3,28 +3,40 @@
describe "FOS Licensing" do
before :all do
# set_fos_db([TripLeg, FlightLogExpense, Vendor, AirportFbo])
# set_dbr_db([TripLeg, FlightLogExpense, Aircraft, Vendor, AirportFbo])
- db = Sequel.fos_dbr(:username => 'datamart', :password => 'datap@ss', :adapter => 'mysql', :host => 'hrkdm', :database => 'dbr')
- db.loggers=[Logger.new($stdout)]
- [TripLeg, FlightLogExpense, Aircraft, Vendor, AirportFbo, AirportFuel].each { |m| m.db = db }
+# db = Sequel.fos_dbr(:username => 'datamart', :password => 'datap@ss', :adapter => 'mysql', :host => 'hrkdm', :database => 'dbr')
+# db.loggers=[Logger.new($stdout)]
+# [TripLeg, FlightLogExpense, Aircraft, Vendor, AirportFbo, AirportFuel].each { |m| m.db = db }
end
- it "puts the lotion on the skin" do
- legs = TripLeg.fuel_passdown_data(Date.parse('2011-02-06'), Date.parse('2011-02-06'), ["SIGNATURE FLIGHT SUPPORT"])
- p "BLAH BLAH BLAH"
- pp legs
+ it "pass a block to include?" do
+ fbos = ["ATLANTIC AVIATION SERVIC", "SIGNATURE FLIGHT SUPPORT", "LANDMARK AVIATION"]
+ search = "LANDMARK AVIATION EAST"
+ result = nil
+ fbos.each do |fbo|
+ result = fbo and break if search.match(/^#{fbo}.*/)
+ end
+
+ p result
+ end
+
+# it "puts the lotion on the skin" do
+# legs = TripLeg.fuel_passdown_data(Date.parse('2011-02-06'), Date.parse('2011-02-06'), ["SIGNATURE FLIGHT SUPPORT"])
+# p "BLAH BLAH BLAH"
+# pp legs
+
# l = TripLeg.filter(:'trip number' => 68562, :'leg number' => 1).eager_graph(:flight_log_expenses => :vendor).all.first
# p "BLAH BLAH BLAH BLAH"
# p l.fuel_expenses.first.vendor
# p FlightLogExpense.where(:trip_leg_id => "SEMJ-3-17-39922-1258", :type => 1)
# tl = TripLeg.filter(:trip_number=>68562, :leg_number =>1).first
# tl = TripLeg.filter(:trip_number => 68562, :leg_number => 1).eager_graph(:fuel_expenses).select_fields(:self => [:trip_number, :leg_number], :fuel_expenses => [:type]).all
# tl = TripLeg.filter(:trip_number => 68562, :leg_number => 1).eager_graph(:aircraft).select_fields(:self => [:trip_number, :leg_number], :aircraft => [:tail_number]).all
- end
+# end
# it "gets the user licensing information" do
# print UserInformation.select(:users_initials, :mobile_access).sql
# end
#
\ No newline at end of file