upwork test answer blogspot elance test answer 2015 .upwork test answer blogspot elance test answer 2015 blogspot.how to pass upwork test answer blogspot elance test answer 2015 free.upwork test answer blogspot elance test answer 2015.elance test answer for blogspot blogger.upwork test answer blogspot elance test answer 2015.upwork test answer blogspot elance test answer 2015 upwork test answer blogspot elance test answer 2015 upwork test answer blogspot elance test answer 2015

Monday, June 15, 2015

upwork Ruby and rails test answers 2015

 upwork Ruby test answers 2015 free

upwork Ruby test answers 2015 
upwork Ruby and rails  test answers 2015 free

If you are a freelancer than you can easily get the answer of upwork Ruby and rails  test answers 2015 free from my post with screenshot.I have shown upwork Ruby and rails  test answers 2015 free with screenshot for begginer freelancers.
upwork Ruby and rails  test answers 2015 free if it is helpfull than leave your comment in the comment box.

1. Select all incorrect statements regarding the Ruby Version Manager (RVM):
a.RVM is a command-line tool which allows developers to easily install, manage, and work with multiple Ruby environments from interpreters to sets of gems.
b. RVM provides a revision control tool to maintain current and historical versions of files such as source code, web pages, and documentation.
c. Test suites, rake tasks, benchmarks and gem commands can be run against multiple Ruby versions at the same time with RVM.
d. RVM cannot automate the installation and maintenance of gems, it has to be done manually.


upwork Ruby test answers 2015 is (b)
2. Which gem is used to install a debugger in Rails 3?
a. gem 'ruby-debug1'
b. gem "ruby-debug19"
c. gem "debugger19"
d. gem "ruby-debugger"


upwork Ruby test answers 2015 is (b)
3. What component of Rails are tested with unit tests?
a. Models
b. Controllers
c. View helpers


upwork Ruby test answers 2015 is (a)

5. Which of the following assertions are used in testing views?
a.assert_valid
b. assert_select_email
c, assert_select_encoded
d. css_select


upwork Ruby test answers 2015 is (C)
5. Which of the following replaced the Prototype JavaScript library in Ruby on Rails as the default JavaScript library?
a. jQuery
b. Ajax
c. Script.aculo.us
d. ajax-li


upwork Ruby test answers 2015 is (a)
6. Which of the following options, when passed as arguments, skips a particular validation?
  1.  :validate => skip
  2.  :validate => off
  3.  :validate => disable
 4. :validate => false


upwork Ruby test answers 2015 is (4)
7. What declaration would you use to set the layout for a controller?
  1.  layout 'new_layout'
  2.  set_layout 'new_layout'
  3.  @layout = 'new_layout'


upwork Ruby test answers 2015 is (1)
8. Suppose a model is created as follows:
rails generate model Sales
rake db:migrate

What would be the best way to completely undo these changes, assuming nothing else has changed in the meantime?
  1.  rails reset models; rake db:rollback
  2.  rails destroy model Sales; rake db:rollback
  3.  rake db:rollback; rails rollback model Sales
  4.  rake db:rollback; rails destroy model Sales


upwork Ruby test answers 2015 is (4)
9. Which is the best way to add a page-specific JavaScript code in a Rails 3 app?
<%= f.radio_button :rating, 'positive', :onclick => "$('some_div').show();" %>
1. <% content_for :head do %> <script type="text/javascript"> <%= render :partial => "my_view_javascript" </script> <% end %> Then in layout file <head> ... <%= yield :head %> </head>
2. In the application_helper.rb file: def include_javascript (file) s = " <script type=\"text/javascript\">" + render(:file => file) + "</script>" content_for(:head, raw(s)) end Then in your particular view (app/views/books/index.html.erb in this example) <% include_javascript 'books/index.js' %>
3. In the controller: def get_script render :file => 'app/assessts/javascripts/' + params[:name] + '.js' end def get_page @script = '/' + params[:script_name] + '.js?body=1' render page end In View <script type="text/javascript",:src => @script>
4 None of these


upwork Ruby test answers 2015 is (1)
10. Unit tests are used to test which of the following components of Ruby on Rails?
  1.  Models
  2.  Controllers
  3.  Views
  4.  Helper classes


upwork Ruby test answers 2015 is (1)
11. Which of the following serves as a structural skeleton for all HTML pages created?
  1.  application.html.erb
  2. default.html.erb
  3.  index.html.erb
  4.  layout.html.erb


upwork Ruby test answers 2015 is (1)
12. Users who are new to MVC design often ask how to query data from Views. Is this possible? And if so, is this a good idea?
  1. It is not possible, because ActiveRecord queries cannot be made from Views.
  2.  It is not possible, because Controllers do not provide enough information to the Views.
  3.  It is possible, but it is a bad idea because Views should only be responsible for displaying objects passed to them.


upwork Ruby test answers 2015 is (3)
13. What does REST stand for?
  1.  Ruby Enclosed Standard Templating
  2.  Resource Standard Transfer
  3.  REasonable Standards Testing
  4.  REpresentational State Transfer
  5.  Rights Enabled Safety Tunnel

upwork Ruby test answers 2015 is (3)

14. Using ERB for views, what filename should be given to a partial called 'login'?
  1.  partial_login.e
  2.  _login.html.e
  3.  login.html.e

upwork Ruby test answers 2015 is (2)

15. Rails automatically requires certain files in an application. Which of the following files are automatically included without an explicit 'require' being necessary?
All files in lib.
 All files in models, views, controllers, and files named rails.rb in lib.
 All files in models, views, controllers, and any init.rb in plugins.
 Only files explicitly referenced from an initializer in config/initializers.


upwork Ruby test answers 2015 is (3)
16. There is a table named Product in a Rails application. The program is required to fetch any 5 rows where the productid is 2. Which of the following is the correct option to perform this action?
  1. Product.find(:productid=>2), :offset=>5
  2.  Product.find(:productid=>2), :limit=>5
  3. Product.find(:productid=>2), :only=>5

upwork Ruby test answers 2015 is (2)

17. The =~ operator is used to do inline Regular Expression matching, for instance:

"function" =~ /fun/
"function" =~ /dinosaurs/

What are possible return values for the =~ matcher?
  1.  true, false
  2.  "fun", nil
  3.  1 and 0 only
  4.  0 and nil only
  5.  nil, 0, and any positive integer

upwork Ruby test answers 2015 is (5)

18. Which of the following actions is fired by default when a new controller is created?
  1.  index
  2.  run
  3.  show
  4.  login

upwork Ruby test answers 2015 is (1)

19. Which of the following will return a User object when used with a model which deals with a table named User?
  1.  User.new
  2.  User.destroy
  3.  User.find
  4.  User.save

upwork Ruby test answers 2015 is (c)

20. In the case of Rails application performance optimization, select all valid ways to do assets compilation:
  1.  Running the rake task with the assets:precompile parameter when CSS and JavaScript files are updated.
  2.  Set a true value for the config.assets.compile parameter in the config/environments/production.rb file.
  3.  Implementing the Rails asset pipeline feature to minify JavaScript & CSS assets.
  4.  All of these.

upwork Ruby test answers 2015 is (1)

21. What is the best way to get the current request URL in Rails?
  1.  request.url
  2.  request.request_uri
  3.  request.fullpath
  4.  request.current_path

upwork Ruby test answers 2015 is (1)

22. How can a value be stored so that it's shared across an entire request (i.e. make it accessible in controllers, views and models)?
  1.  Put it in a global variable.
  2.  Create a Singleton and store it in a class variable.
  3.  Store it in a thread locally.


upwork Ruby test answers 2015 is (2)

23. Which of the following commands adds the data model info to the model file?
  1. bundle install
  2.  generate model
  3.  annotate
  4.  Rails server

upwork Ruby test answers 2015 is (2)

24. Which of the following HTML template languages are supported by Ruby?
 Embedded Ruby
HAML
 Mustache
 Razor


upwork Ruby test answers 2015 is (1)


25. In a has_many association, what is the difference between build and new?
// user.rb
has_many :posts
// post.rb
belongs_to :user
  1.  'new' sets the foreign key while 'build' does not.
  2.  'build' sets the foreign key while 'new' does not.
  3.  'build' sets the foreign key and adds it to the collection.
  4.  'new' sets the foreign key and adds it to the collection.



upwork Ruby test answers 2015 is (3)
26. What is the output of the following code?

&quot;test&quot;*5
  1.  type casting error
  2.  test5
  3.  5
  4.  testtesttesttesttest

upwork Ruby test answers 2015 is (4)

27. When using full-page caching, what happens when an incoming request matches a page in the cache?
  1. The web-server serves the file directly from disk, bypassing Rails.
  2.  Rails checks to see if there is a cached page on disk and passes it onto the server.
  3.  Rails checks its in-memory cache and passes the page onto the server.


upwork Ruby test answers 2015 is (1)

28. What is the difference between _url and _path while being used in routes?
  1.  _url is absolute while _path is relative.
  2.  _path is relative while _path is absolute.
  3.  _path is used in controllers while _url is used in views.
  4.  _path is used in views while _url is used in controllers.

upwork Ruby test answers 2015 is (1)

29. Which of the following code samples will get the index of |page| inside of a loop?
  1. <% @images.each.do |page,index| %> <% end %>
  2.  <% @images.each_with_index do |page, index| %> <% end %>
  3.  <% @images.collect.each.at_index do |page, index| %> <% end %>

4. None of these


upwork Ruby test answers 2015 is (2)
30. Which of the following choices will write routes for the API versioning scenario described below?

/api/users returns a 301 to /api/v2/users
/api/v1/users returns a 200 of users index at version 1
/api/v3/users returns a 301 to /api/v2/users
/api/asdf/users returns a 301 to /api/v2/users
 namespace :api do namespace :v1 do resources :users end namespace :v2 do resources :users end match 'v:api/*path', :to => redirect("/api/v2/%{path}") match '*path', :to => redirect("/api/v2/%{path}") end
  1.  namespace :api do resources :users end namespace :v2 do resources :users end match 'v:api/*path', :to => redirect("/api/v1/%{path}") match '*path', :to => redirect("/api/v1/%{path}") end
  2.  namespace :api do scope :module => :v3, &current_api_routes namespace :v3, &current_api_routes namespace :v2, &current_api_routes namespace :v1, &current_api_routes match ":api/*path", :to => redirect("/api/v3/%{path}") end
  3.  None of these


upwork Ruby test answers 2015 is (3)

31. What is the output of the following Ruby code?

puts "The multiplication output of 10,10,2 is #{10*10*2}"
  1.  200.
  2.  The multiplication output of 10,10,2 is #{10*10*2}.
  3.  The multiplication output of 10,10,2 is 200.
  4. The code will give a syntax error

upwork Ruby test answers 2015 is (3)

32. What is difference between "has_one" and "belong_to"?
  1.  "has_one" should be used in a model whose table have foreign keys while "belong_to" is used with an associated table.
  2.  "belong_to" should be used in a model whose table have foreign keys while "has_one" is used with an associated table.
  3. The two are interchangeable.
  4.  None of these

upwork Ruby test answers 2015 is (1)

33. Which of the following is the correct way to know the Rails root directory path?
  1.  RAILS_ROOT
  2.  Rails.root
  3.  Rails.root.show
  4.  Rails.show.root

upwork Ruby test answers 2015 is (2)

34. What is best way to create primary key as a string field instead of integer in rails.
  1.  when creating a new table don't add primary key using this create_table users, :id => false do |t| t.string :id, :null => false ...... end execute("ALTER TABLE users ADD PRIMARY KEY (id)") if not using id as primary key then in users model add the following line class User < ActiveRecord::Base self.primary_key = "column_name" .... end
  2.  you can add a key to column name to make it primary create_table users :id => false do |t| t.string :column_name, :primary => true end

upwork Ruby test answers 2015 is (1)

35. In a Rails application, a Gemfile needs to be modified to make use of sqlite3-ruby gems. Which of the following options will use these gems, as per the new Gemfile?
  1.  install bundle Gemfile
  2.  bundle install
  3.  mate Gemfile
  4.  gem bundle install

upwork Ruby test answers 2015 is (2)


36. What is the recommened Rails way to iterate over records for display in a view?
  1. Implicitly loop over a set of records, and send the partial being rendered a :collection.
  2.  Use each to explicitly loop over a set of records.
  3. Use for to fetch individual records explicitly in a loop.

upwork Ruby test answers 2015 is (1)

37. where we use attr_accessor and attr_accessible in rails ?

  1.  controller
  2.  helper
  3.  model
  4. view

upwork Ruby test answers 2015 is (3)

38. Given the following code, where is the "party!" method available?

module PartyAnimal
def self.party!
puts "Hard! Better! Faster! Stronger!"
end
end

class Person
include PartyAnimal
end
  1. PartyAnimal.party!
  2.  Person.party!
  3.  Person.new.party!
  4.  Both PartyAnimal.party! and Person.party!
  5.  None of these

upwork Ruby test answers 2015 is (1)

39. Which part of the MVC stack does ERB or HAML typically participate in?
  1.  Class
  2. Controller
  3.  Model
  4.  Module
  5.  View
upwork Ruby test answers 2015 is (5)

40. Which of the following items are stored in the models subdirectory?
  1.  helper classes
  2.  database classes
  3.  HTML layout templates
  4.  Config files
upwork Ruby test answers 2015 is (2)

41. What is the output of the following code in Ruby?
x= "A" + "B"
puts x
y= "C" << "D"
puts y
  1.  AB CD
  2.  AB C
  3.  AB D
  4.  AB DC
upwork Ruby test answers 2015 is (1)

42. What exception cannot be handled with the rescue_from method in the application controller?
e.g
class ApplicationControllers < ActionController::Base
rescue_from Exception, with: error_handler
..........
end
  1.  Server errors
  2.  Record not found (404)
  3.  Routing errors
  4.  All of these


upwork Ruby test answers 2015 is (1)
43. If a method #decoupage(n) is described as O(n^2), what does that mean?
  1.  The fewest number of operations it will perform is n*n.
  2.  The worst case run time is proportional to the size of the square of the method's input.
  3.  The method operates by squaring the input.
  4.  The return value for the method will be the length of the input squared
upwork Ruby test answers 2015 is (2)


44. Is an AJAX call synchronous or asynchronous?
  1.  Asynchronous
  2.  Synchronous
3. Either; it is configurable

upwork Ruby test answers 2015 is (3)

44. What is green-threading?
  1.  A design pattern where a fixed-size pool of threads is shared around a program.
  2.  When threads are emulated by a virtual machine or interpreter.
  3.  Where programs are run across multiple CPUs.

upwork Ruby test answers 2015 is (2)


    46. Which of the following commands will clear out sample users from the development database?
    1.  rake db:migrate
    2.  rake db:reset
     3.rake db:rollback

    upwork Ruby test answers 2015 is (2)
    47. Given below are two statements regarding the Ruby programming language:

    Statement X: "redo" restarts an iteration of the most internal loop, without checking loop condition.
    Statement Y: "retry" restarts the invocation of an iterator call. Also, arguments to the iterator are re-evaluated.

    Which of the following options is correct?
    1. Statement X is correct, but statement Y is incorrect.
    2.  Statement X is incorrect, but statement Y is correct.
    3.  Both statements are correct.
    4.  Both statements are incorrect.
    upwork Ruby test answers 2015 is (3)

    48. Choose the best way to implement sessions in Rails 3:

    A) Using CookieStore
    B) By creating a session table and setting config/initializers/session_store.rb with Rails.application.config.session_store :active_record_store
    C) By setting config/initializers/session_store.rb with Rails.application.config.session_store :active_record_store only

    1, A
    2. B
    3. C
    4. B and C

    upwork Ruby test answers 2015 is (2)


    49. Which of the following is the default way that Rails seeds data for tests?
    1.  Data Migrations
    2.  Factories
    3.  Fixture Factories
    4.  Fixtures
    upwork Ruby test answers 2015 is (4)

    49. Which of the following is the correct way to skip ActiveRecords in Rails 3?
    1.  ActiveRecords cannot be skipped.
    2. Use option -O while generating application template.
    3.  Use option -SKIP_AR while generating the application template.
    4.  Add new line SKIP: ACTIVERECORD in config.generators
    upwork Ruby test answers 2015 is (2)

    51. What is the output of the following code?

    puts "aeiou".sub(/[aeiou]/, '*')
    1.  *
    2.  *****
    3.  *eiou
    4.  nil
    upwork Ruby test answers 2015 is (3)

    52. What is the difference between :dependent => :destroy and :dependent => :delete_all in Rails?
    1.  There is no difference between the two; :dependent => :destroy and :dependent => :delete_all are semantically equivalent.
    2.  In :destroy, associated objects are destroyed alongside the object by calling their :destroy method, while in :delete_all, they are destroyed immediately, without calling their :destroy method.
    3.  In :delete_all, associated objects are destroyed alongside the object by calling their :destroy method, while in :destroy, they are destroyed immediately, without calling their individual :destroy methods.
    4.  None of these.
    upwork Ruby test answers 2015 is (3)

    53. Which of the following methods is used to check whether an object is valid or invalid?
    1.  .valid? and .invalid?
    2. valid() and invalid()
    3.  isvalid and isinvalid
    upwork Ruby test answers 2015 is (1)

    54. Which of the following is the correct way to rollback a migration?
    1.  A migration cannot be rollbacked.
    2.  rake db:rollback STEP=N (N is the migration number to be rollbacked)
    3.  rake db:migrate:reset: (N) (N is the migration number to be rollbacked)
    4.  rake db:rollback migration=N (N is the migration number to be rollbacked)
    upwork Ruby test answers 2015 is (2)
    55. Which of the following is the correct syntax for an input field of radio buttons in form_for?
    1.  <%= f.radio_button :contactmethod, 'sms' %>
    2.  <%= f.radio_button_tag :contactmethod, 'sms' %>
    3.  <%= radio_button_tag :contactmethod, 'sms' %>
    4.  <%= f.radio_button "contactmethod", 'sms' %>
    upwork Ruby test answers 2015 is (1)

    56. In order to enable locking on a table, which of the following columns is added?
    1.  lock_version column
    2.  identity column
    3.  primary key column
    4.  lock_optimistic column
    upwork Ruby test answers 2015 is (1)

    57. If a float is added to an integer, what is the class of the resulting number? i.e. 1.0 + 2
    1.  Integer
    2. Float
    3.  BigDecimal
    upwork Ruby test answers 2015 is (2)

    58. In a Rails Migration, which of the following will make a column unique, and then have it indexed?
    1.  add_index :table_name, :column_name, :unique => true
    2. add_index :unique => true ,:table_name, :column_name
    3. add_index :table_name, [:column_name_a, :unique => true ,:column_name_b], :unique => true
    4. None of these
    upwork Ruby test answers 2015 is (1)

    59. Which of the following will disable browser page caching in Rails?
    1.  expire_page(:controller => 'products', :action => 'index')
    2. expire_fragment(:controller => 'products', :action => 'index')
    3.  expire_page_fragment('all_available_products')
    4.  expire_fragment('all_available_products')
    upwork Ruby test answers 2015 is (1)

    60. Which of the following commands will test a particular test case, given that the tests are contained in the file test/unit/demo_test.rb, and the particular test case is test_one?
    1.  $ ruby -Itest test/unit/demo_test.rb -n test_one
    2.  $ ruby -Itest test/unit/demo_test.rb -a test_one
    3.  $ ruby -Itest test/unit/demo_test.rb test_one
    4.  $ ruby -Itest test/unit/demo_test.rb -t test_one
    upwork Ruby test answers 2015 is (1)
    61. Consider the following code snippet:

    def index
    render
    end

    The corresponding index.html.erb view is as following:

    <html>
    <head>

    <title>Ruby on Rails sample application | <%=@title%></title>

    </head>
    <body></body>
    </html>

    Which of the following options is correct?
    1.  The application will give an exception as @title variable is not defined in the controller.
    2.  The HTML page will render with the title: Ruby on Rails sample application | <%=@title%>.
    3. The HTML page will render with the title: Ruby on Rails sample application |.
    4.  The HTML page will render with the title: Ruby on Rails sample application.
    upwork Ruby test answers 2015 is (3)

    62. If a controller is named "Users", what would its helpers module be called?
    1. UsersHelper
    2.  UserControllerHelper
    3.  UserHelp


    upwork Ruby test answers 2015 is (1)
    63. Which of the following statements is incorrect?
    1.  Rails does not support ODBC connectivity
    2.  Rails can rollback database changes in development mode.
    3.  Rails can work and connect with multiple databases.
    4.  Rails database information is stored in the database.yml file.
    upwork Ruby test answers 2015 is (1)

    64. What is the Singleton design pattern?
    1.  A class for which there is only ever one instance.
    2. A single feature application, intended to enhance usability by keeping things simple.
    3.  A class which is never instanced, but acts as a container for methods which are used by it's subclasses.
    upwork Ruby test answers 2015 is (1)

    65. With the two models Hive and Bee; when creating a belongs_to association from the Bee model to Hive, what is the foreign key generated on Bee?
    1.  hive_id
    2.  hives_id
    3.  ee_id
    upwork Ruby test answers 2015 is (1)

    66. Which of the following is not true about log levels in Ruby on Rails?
    1.  The available log levels are: :debug, :info, :warn, :error, and :fatal, corresponding to the log level numbers from 1 up to 5 respectively.
    2.  To check the current log level, the Rails.logger.level method has to be called.
    3.  By default, each log is created under Rails.root/log/ and the log file name is environment_name.log.
    4.  The default Rails log level is error in production mode and debug in development and test mode.
    upwork Ruby test answers 2015 is (1)

    67. When a new controller named "admin2" is created, the JS and the CSS files are created in:
    1; controllers
    2.helpers
    3. assets
    4 .views

    upwork Ruby test answers 2015 is (3)
    68. Which of the following is not a built-in Rails caching strategy used to reduce database calls?
    1.  Page Caching
    2.  Fragment Caching
    3.  Object Caching
    4.  Query Caching
    upwork Ruby test answers 2015 is (4)

    69. In a Rails application, the developmental and production configuration are stored in the:
    1.  config/environment folder
    2.  public folder
    3.  spec folder
    4.  task folder
    upwork Ruby test answers 2015 is (1)

    70. What is the convention for methods which end with a question mark? e.g. #all?, #kind_of?, directory?
    1.  They should always require arguments.
    2.  They should always return a boolean value.
    3.  They should always report a value of the object they're being called on.


    upwork Ruby test answers 2015 is (2)
    71. Which of the following correctly handles the currency field?

    A) add_column :items, :price, :decimal, :precision => 8, :scale => 2
    B) add_money :items, :price, currency: { present: false }
    a. A
    b. B
    c. Both A and B are correct.
    d. Both A and B are incorrect.

    upwork Ruby test answers 2015 is (a)
    72. How can a partial called "cart" be rendered from a controller called "ProductsController", assuming the partial is in a directory called "shared"?
    a, render :partial => 'shared/cart'
    b, partial 'shared/cart'
    c. render 'cart'


    upwork Ruby test answers 2015 is (a)
    73. What does the 4xx series of HTTP errors represent?
    a. They are intended for cases in which the server seems to have encountered an error.
    b. They are intended for cases in which the client seems to have encountered an error.
    c. They indicate that further action needs to be taken by the user agent in order to fulfill the request.
    d. They indicate that no further action can be taken by the user agent.


    upwork Ruby test answers 2015 is (a)
    74. Which of the following validations in Rails checks for null fields?

    a. validates_presence_of
    b. validates_length_of
    c, validates_confirmation_of
    d. validates_uniqueness_of


    upwork Ruby test answers 2015 is (a)
    75. What is output of following statements?
    1) "".nil? == "".empty? && "".blank? == "".empty?
    2) !"".nil? == "".empty? && "".blank? == "".empty?
    3) nil.nil? == nil.empty? && nil.blank? == nil.empty?
    4) !"".blank? == "".present?
    5) "".any? == !"".empty?
    6) " ".blank? == " ".empty?

    a.1) false 2) true 3) NoMethodError: undefined method `empty?' for nil:NilClass 4) true 5) NoMethodError: undefined method `any?' for "":String 6) false
    b.1) false 2) NoMethodError: undefined method `empty?' for "":String 3) true 4) true 5) NoMethodError: undefined method `any?' for "":String 6) false
    c, 1) false 2) true 3) true 4) true 5) false 6) false
    d. 1) false 2) true 3) false 4) true 5) true 6) false


    upwork Ruby test answers 2015 is (a)
    76. For the String class, what's the difference between "#slice" and "#slice!"?
    Answers:
    • None, "#slice" is just an alias for "#slice!".
    • There is no "#slice!" method in Ruby on Rails.
    • "#slice" returns a new object, "#slice!" destructively updates — mutates — the object's value.


    upwork Ruby test answers 2015 is (a)
    77. Which of the following controller actions (by default) are best suited to handle the GET HTTP request?

    • index
    a. show
    b. create
    c. edit
    d. update


    upwork Ruby test answers 2015 is (c)
    78. Which of the following is true about writing tests for a Ruby on Rails application?
    a. Rails semi-automates the process of writing tests. It starts by producing skeleton test code in the background while models and controllers are being written.
    b. Running tests in Rails ensures that the code adheres to the desired functionality even after major code refactoring.
    c.. Rails tests can simulate browser requests, and thus test the application's response without having to test it through a browser.
    d. All of these.


    upwork Ruby test answers 2015 is (d)
    79. What is the behavior of class variables with subclasses?
    a.Subclasses inherit a default value for the class variable, which can then be modified for just the subclass.
    b. Class variables are shared between between all classes in the hierarchy.
    c. Class variables are not inherited.

    upwork Ruby test answers 2015 is (b)
    80. Consider the following information for a User view:

    user_path named route with value "/users/"

    @user = 1


    Now, consider the following code in the HTML erb template:

    <%= link_to user_path(@user), "Angel" %>


    What will be the HTML output of this code?
    a. a href='/users/1'>Angel</a
    b. a href='Angel'>/users/1</a
    c. a href='/users/1'>/users/1</a
    d. a href='Angel'>Angel</a


    upwork Ruby test answers 2015 is (d)

    81. What is the output of the following code?
    $val = 20
    print "Sample Text\n" if $val
    a. 20
    b. Sample Text
    c.No output
    d. Syntax error


    upwork Ruby test answers 2015 is (B)
    82. If a model called BlogComment is defined, what would its DB table be called?
    a. blog_comment
    b.blogcomments
    c. blog_comments


    upwork Ruby test answers 2015 is (c)

    83. Which of the following options is used to create a form HTML in the erb files?
    a. form_for
    b. create_form
    c. form_do
    d. form

    upwork Ruby test answers 2015 is (d)
    84. Which of the following options will disable the rendering of the view associated with a controller action?
    a. render :layout=>false
    c. render :layout=>nil
    b. render :layout=>disabled
    a. render :layout=>off


    upwork Ruby test answers 2015 is (a)
    upwork Ruby and rails test answers 2015
     upwork Ruby and rails test answers 2015 free



    See interesting fb & twitter  tips @http://shahin.murkho.com


    0 comments:

    Post a Comment

    fuft7uuuuuuuuuuuuuuuuuuuuuuuuu

    Popular Posts

    Categories

    upwork test answer blogspot elance test answer 2015 .upwork test answer blogspot elance test answer 2015 blogspot.how to pass upwork test answer blogspot elance test answer 2015 free.upwork test answer blogspot elance test answer 2015.elance test answer for blogspot blogger.upwork test answer blogspot elance test answer 2015.upwork test answer blogspot elance test answer 2015 upwork test answer blogspot elance test answer 2015 upwork test answer blogspot elance test answer 2015

    Powered by Blogger.

    Labels

    Followers

    About Me

    moshiur rahman
    View my complete profile

    Labels

    stat counter

    http://blogspotforbloggerhelp.blogspot.com/

    fb plugin

    Popular Posts

    Email Newsletter

    Subscribe to our newsletter to get the latest updates to your inbox. ;-)


    Your email address is safe with us!

    Pages