Jump to content

The ultimate community for Ruby on Rails developers.


Photo

"test" vs. "testing" in the database.yml

database.yml

  • Please log in to reply
3 replies to this topic

#1 chorbl

chorbl

    Passenger

  • Members
  • 2 posts

Posted 10 September 2013 - 07:09 PM

Why is it "test" instead of "testing" in the database.yml?  It seems to me pretty plain that it should be "testing" in order to remain consistent with the other 2: development and production.  E.g. you could think about it as development phase, testing phase, production phase vs. develop, test, and, well, produce doesn't really make sense but that's irrelevant. 

 

Reason I ask is cus I encountered an "adapter not specified" when trying to run rspec after switching to postgresql and hence modifying my database.yml file and the problem was that I unthinkingly wrote "testing" instead of "test".



#2 Rowel

Rowel

    Controller

  • Members
  • 109 posts

Posted 10 September 2013 - 07:24 PM

E.g. you could think about it as development phase, testing phase, production phase vs. develop, test, and, well, produce doesn't really make sense but that's irrelevant. 

 

I think it's used as a noun.  

Development environment 

Test environment

Production environment 



#3 chorbl

chorbl

    Passenger

  • Members
  • 2 posts

Posted 10 September 2013 - 08:07 PM

Hmm.  I'm not sure what you mean.  

 

Development and production are processes.  Test is a thing. 

 

Think of answering the question, "What is the ____ environment?" for each environment you've specified.  

 

"The environment in which development is done".  

"The environment in which test is done."  

"The environment in which production is done".  

 

Seems very clear here that there is an inconsistency.  "The environment in which testing is done" works, however.



#4 Rowel

Rowel

    Controller

  • Members
  • 109 posts

Posted 10 September 2013 - 08:29 PM

 "The environment in which testing is done" works, however.

 

Sure, if you construct your sentence that way, using it as a "verb".  But it falls apart, because then it should be:

developing

testing

producing

... to make everything consistent. 

 

But as you said "Test" is a thing... it's a noun... definition of being a person, place or thing. 

Development environment

Test environment

Production environment

... which are all places, which are all nouns.  

 

:)

 

Either way, Rails is very opinionated.  If DHH decided to call it 

Monkey environment

WTF environment

FUBAR environment

.... we don't have any choice but to follow it since he's the one that designed the whole framework.  

 

 

** of course, one can also use the word "test" as a verb... "Please test this for me."  

But in the Rails case, I think it's used as a noun. 


  • kany likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users