Module: Taza

Defined in:
lib/taza/flow.rb,
lib/taza/page.rb,
lib/taza/site.rb,
lib/taza/tasks.rb,
lib/taza/entity.rb,
lib/taza/options.rb,
lib/taza/browser.rb,
lib/taza/fixture.rb,
lib/taza/version.rb,
lib/taza/fixtures.rb,
lib/taza/settings.rb,
lib/taza/generators/flow_generator.rb,
lib/taza/generators/page_generator.rb,
lib/taza/generators/site_generator.rb,
lib/taza/generators/taza_generators.rb,
lib/taza/generators/project_generator.rb,
lib/taza/generators/partial_generator.rb

Defined Under Namespace

Modules: Rake Classes: Browser, BrowserUnsupportedError, ElementError, Entity, FilterError, Fixture, Flow, FlowGenerator, Options, Page, PageGenerator, PartialGenerator, ProjectGenerator, Settings, Site, SiteGenerator, TazaGenerators

Constant Summary

VERSION =
"0.9.2.1"

Class Method Summary collapse

Class Method Details

.load_fixturesObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/taza/fixtures.rb', line 4

def self.load_fixtures
  dirs = Dir.glob(File.join(Fixture.base_path,'*/'))
  dirs.unshift Fixture.base_path
  dirs.each do |dir|
    mod = dir.sub(Fixture.base_path,File.join(File.basename(Fixture.base_path),'')).camelize.sub(/::$/,'')
    self.class_eval "module \#{mod}\ndef self.included(other_module)\nfixture = Fixture.new\nfixture.load_fixtures_from('\#{dir}')\nfixture.fixture_names.each do |fixture_name|\nself.class_eval do\ndefine_method(fixture_name) do |entity_key|\nfixture.get_fixture_entity(fixture_name,entity_key.to_s)\nend\nend\nend\nend\nend\n"
  end
end