Class: Cucumber::ThinkingSphinx::InternalWorld
- Inherits:
-
Object
- Object
- Cucumber::ThinkingSphinx::InternalWorld
- Defined in:
- lib/cucumber/thinking_sphinx/internal_world.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#database ⇒ Object
Returns the value of attribute database.
-
#database_file ⇒ Object
Returns the value of attribute database_file.
-
#fixtures_directory ⇒ Object
Returns the value of attribute fixtures_directory.
-
#host ⇒ Object
Returns the value of attribute host.
-
#migrations_directory ⇒ Object
Returns the value of attribute migrations_directory.
-
#models_directory ⇒ Object
Returns the value of attribute models_directory.
-
#password ⇒ Object
Returns the value of attribute password.
-
#temporary_directory ⇒ Object
Returns the value of attribute temporary_directory.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #configure_database ⇒ Object
-
#initialize ⇒ InternalWorld
constructor
A new instance of InternalWorld.
- #setup ⇒ Object
Constructor Details
#initialize ⇒ InternalWorld
Returns a new instance of InternalWorld.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 11 def initialize pwd = Dir.pwd @temporary_directory = "#{pwd}/tmp" @migrations_directory = "#{pwd}/features/thinking_sphinx/db/migrations" @models_directory = "#{pwd}/features/thinking_sphinx/models" @fixtures_directory = "#{pwd}/features/thinking_sphinx/db/fixtures" @database_file = "#{pwd}/features/thinking_sphinx/database.yml" @adapter = ENV['DATABASE'] || 'mysql' @database = 'thinking_sphinx' @username = 'thinking_sphinx' # @password = 'thinking_sphinx' @host = 'localhost' end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
8 9 10 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 8 def adapter @adapter end |
#database ⇒ Object
Returns the value of attribute database.
8 9 10 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 8 def database @database end |
#database_file ⇒ Object
Returns the value of attribute database_file.
6 7 8 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 6 def database_file @database_file end |
#fixtures_directory ⇒ Object
Returns the value of attribute fixtures_directory.
6 7 8 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 6 def fixtures_directory @fixtures_directory end |
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 8 def host @host end |
#migrations_directory ⇒ Object
Returns the value of attribute migrations_directory.
6 7 8 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 6 def migrations_directory @migrations_directory end |
#models_directory ⇒ Object
Returns the value of attribute models_directory.
6 7 8 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 6 def models_directory @models_directory end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 8 def password @password end |
#temporary_directory ⇒ Object
Returns the value of attribute temporary_directory.
6 7 8 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 6 def temporary_directory @temporary_directory end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 8 def username @username end |
Instance Method Details
#configure_database ⇒ Object
39 40 41 42 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 39 def configure_database ActiveRecord::Base.establish_connection database_settings self end |
#setup ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cucumber/thinking_sphinx/internal_world.rb', line 26 def setup make_temporary_directory configure_cleanup configure_thinking_sphinx configure_active_record prepare_data setup_sphinx self end |