Skip to content

Instantly share code, notes, and snippets.

@phinze
Created April 24, 2009 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phinze/101147 to your computer and use it in GitHub Desktop.
Save phinze/101147 to your computer and use it in GitHub Desktop.
# CODE ------------------
# app/helpers/really_long_helper.rb
class ReallyLongHelper
def fooA
'hello america'
end
# ...
def fooZZ
'hello zanzabar'
end
end
# SPECS -----------------
# spec/helpers/really_long_helper_spec.rb
describe ReallyLongHelper
it 'says hello to america' # { ... }
# ...
it 'says hello to zanzabar' # { ... }
end
# CODE ------------------
# app/helpers/really_long/base.rb
class ReallyLong::Base
include ReallyLong::WesternHemisphere
include ReallyLong::EasternHemisphere
end
# app/helpers/really_long/western_hemisphere.rb
module ReallyLong::WesternHemisphere
# ...
end
# app/helpers/really_long/eastern_hemisphere.rb
module ReallyLong::EasternHemisphere
# ...
end
# SPECS -----------------
# ?????
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment