Skip to content

Instantly share code, notes, and snippets.

View trystant's full-sized avatar
💭
profile moved to github.com/mnyon-grandkru

Mark Nyon trystant

💭
profile moved to github.com/mnyon-grandkru
View GitHub Profile
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Subscription, 'associations' do
before :each do
@subscription = Subscription.new
end
it 'should belong to an account' do
@subscription.should belong_to(:account)
end
describe AccountProxy, 'associations' do
it 'should belong to an account' do
AccountProxy.new.should belong_to(:account)
end
it 'should belong to a point source' do
AccountProxy.new.should belong_to(:point_source)
end
it 'should have many transfers' do
describe AccountProxy, 'associations' do
it 'should belong to an account' do
AccountProxy.new.should belong_to(:account)
end
it 'should belong to a point source' do
AccountProxy.new.should belong_to(:point_source)
end
it 'should have many transfers' do
nyon:ecostrong mnyon$ git branch -r
origin/2674-messages-not-received
origin/HEAD -> origin/master
origin/UK
origin/abrett-2324
origin/abrett-ads
origin/ac-assetless
origin/adTech
origin/assetless
origin/assetless_pre_rebase
V1.0|Begin|104|Thing|Place|20080613_130001|ThingFeed.20080613_130001.Result.txt|10
1|1111|XYZ|124080|1111111111111111111|OFP|100
2|2222|XYZ|124122|1111111111111111111|ONP|500
3|3333|XYZ|124123|1111111111111111111|ONP|500
4|4444|XYZ|124124|1111111111111111111|SRE|100
5|5555|XYZ|124125|1111111111111111111|FST|3600
67|6666|XYZ|124180|1111111111111111111|ADJ|100
7|7777|XYZ|124181|1111111111111111111|ADJ|1500
8|8888|XYZ|124260|1111111111111111111|FST|200
9|9999|XYZ|124261|1111111111111111111|SRE|100
grammar ThingFeed
rule thing_file
thing_header thing_feed_body+ footer
end
rule thing_header
file_version_number pipe header_value pipe feed_id pipe feed_type pipe source pipe feed_date pipe results_file_name pipe record_count newline
end
require 'rubygems'
require 'treetop'
require 'polyglot'
Treetop.load File.dirname(__FILE__) + '/../grammars/test'
class Driver
attr_accessor :test_parser, :test_parser_errors
def initialize
@test_parser = TestParser.new
@test_parser_errors = []
"Expected one of ONP, OFP at line 10, column 39 (byte 510) after V1.0|Begin|104|Thing|Place|20080613_130001|ThingFeed.20080613_130001.Result.txt|10\n1|1111|XYZ|124080|1111111111111111111|OFP|100\n2|2222|XYZ|124122|1111111111111111111|ONP|500\n3|3333|XYZ|124123|1111111111111111111|ONP|500\n4|4444|XYZ|124124|1111111111111111111|SRE|100\n5|5555|XYZ|124125|1111111111111111111|FST|3600\n67|6666|XYZ|124180|1111111111111111111|ADJ|100\n7|7777|XYZ|124181|1111111111111111111|ADJ|1500\n8|8888|XYZ|124260|1111111111111111111|FST|200\n9|9999|XYZ|124261|1111111111111111111|"
rake aborted!
Referential integrity violation; child <Location:78> was not found for :addressables
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/base.rb:25:in `instantiate'
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/rails/activerecord/lib/active_record/base.rb:535:in `find_by_sql_without_trace_ActiveRecord___self_name__find'
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/rails/activerecord/lib/active_record/base.rb:535:in `collect!'
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/rails/activerecord/lib/active_record/base.rb:535:in `find_by_sql_without_trace_ActiveRecord___self_name__find'
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:138:in `find_by_sql_without_trace_ActiveRecord_find'
/var/www/ecostrong/sysTest2/releases/20090814141818/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:41:in `trace_method_execution_with_sc
/opt/ree/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 28, col 3: ` :g_partner: &g_partner_schedules' (ArgumentError)
from /opt/ree/lib/ruby/1.8/yaml.rb:133:in `load'
from /var/www/ecostrong/techInt2/releases/20090818152827/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:25:in `read_config'
from /var/www/ecostrong/techInt2/releases/20090818152827/vendor/plugins/backgroundrb/lib/backgroundrb.rb:10
from /opt/ree/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ree/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/www/ecostrong/techInt2/releases/20090818152827/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
from /var/www/ecostrong/techInt2/releases/20090818152827/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /var/www/ecostrong/techInt2/re